public static function getMessage( $code, $lang = 'EN' ) {
    if( $code < 0 ) {
      return null;
    } //code invalid

    $lang = strtoupper( $lang );

    if( !array_key_exists( $lang, self::$code ) ) { //language not found
      $lang = 'EN';
    }

    if( array_key_exists( $code, self::$code[$lang] ) ) { //code not defined
      return self::$code[$lang][$code];
    }

    return null;
  }
public static function getMessage( $code, $lang = 'EN' ) {
    if( $code < 0 ) {
      return null;
    } //code invalid

    $lang = strtoupper( $lang );

    if( !array_key_exists( $lang, self::$code ) ) { //language not found
      $lang = 'EN';
    }

    if( array_key_exists( $code, self::$code[$lang] ) ) { //code not defined
      return self::$code[$lang][$code];
    }

    return null;
  }
public static function getMessage ( $ code , $ lang = 'EN' ) { if ( $ code < 0 ) { return null ; } //code invalid $ lang = strtoupper ( $ lang ) ; if ( ! array_key_exists ( $ lang , self :: $ code ) ) { //language not found $ lang = 'EN' ; } if ( array_key_exists ( $ code , self :: $ code [ $ lang ] ) ) { //code not defined return self :: $ code [ $ lang ] [ $ code ] ; } return null ; }
Returns the message string of an given code in the given language

@param integer code
@param String language
@return null/String message
Returns the message string of an given code in the given language