Property | Type | Description | |
---|---|---|---|
$content | array | Language content | |
$language | string | Default system language | |
$locale | string | Default system locale |
Method | Description | |
---|---|---|
__ ( string $str, string | array $params = null ) | Return the translated string | |
__construct ( string $lang = null ) : |
Constructor | |
_e ( string $str, string | array $params = null ) : void | Echo the translated string. | |
createXmlFile ( array $lang, array $locales, string $file ) : void | Create an XML language file from an array of data. | |
createXmlFromText ( string $source, string $output, string $target = null ) : void | Create an XML document fragment from a source file and an output file, each entry separated by a new line | |
factory ( string $lang = null ) : |
Static method to load the I18n object. | |
getLanguage ( ) : string | Get current language setting. | |
getLanguages ( string $dir = null ) : array | Get languages from the XML files. | |
getLocale ( ) : string | Get current locale setting. | |
loadFile ( string $langFile ) : void | Load language content from an XML file. |
Method | Description | |
---|---|---|
loadCurrentLanguage ( ) : void | Get language content from the XML file. | |
translate ( string $str, string | array $params = null ) : mixed | Translate and return the string. |
public __construct ( string $lang = null ) : |
||
$lang | string | |
return |
public getLanguage ( ) : string | ||
return | string |
public static getLanguages ( string $dir = null ) : array | ||
$dir | string | |
return | array |
protected loadCurrentLanguage ( ) : void | ||
return | void |