Property | Type | Description | |
---|---|---|---|
$DeveloperContainer | Core translations, and untranslated codes. | ||
$DeveloperMode | Whether or not to record core translations. | ||
$Locale | The name of the currently loaded Locale. | ||
$LocaleContainer | Holds all locale sources. | ||
$SavedDeveloperCalls | integer | ||
$SetLocales | array |
Method | Description | |
---|---|---|
__construct ( $LocaleName, $addonManager = null ) | Setup the default locale. | |
canonicalize ( string $locale ) : string | Canonicalize a locale string so different representations of the same locale can be used together. | |
crawlAllLocaleSources ( ) : array | Crawl the various addons and locales for all of the applicable translation files. | |
current ( ) : boolean | Returns the name of the currently loaded locale. | |
getDefinitions ( ) | Get all definitions from the loaded locale. | |
getDeveloperDefinitions ( ) | Get all known core. | |
getLocaleSources ( string $locale ) : array | Gets the locale sources for a given locale. | |
language ( boolean $iso6391 = false ) : boolean | string | Return the first 2 letters of the current locale (the language code). | |
load ( string $Path, boolean $Dynamic = false ) | Load a locale definition file. | |
refresh ( ) | Reload the locale and its translations. | |
saveTranslations ( $Translations, boolean $LocaleName = false ) | ||
set ( string $LocaleName ) | Defines and loads the locale. | |
setTranslation ( mixed $Code, string $Translation = '', $Save = false ) | Assigns a translation code. | |
translate ( string $Code, string $Default = false ) : string | Translates a code into the selected locale's definition. | |
unload ( ) | Clears out the currently loaded locale settings. |
public __construct ( $LocaleName, $addonManager = null ) | ||
$LocaleName |
public static canonicalize ( string $locale ) : string | ||
$locale | string | The locale code to canonicalize. |
return | string | Returns the canonicalized version of the locale code. |
public crawlAllLocaleSources ( ) : array | ||
return | array | Returns an array keyed by locale names where each value is an array of translation paths for that locale. |
public getDefinitions ( ) |
public getLocaleSources ( string $locale ) : array | ||
$locale | string | The name of the locale. |
return | array | Returns an array of paths to the translations for the locale. |
public saveTranslations ( $Translations, boolean $LocaleName = false ) | ||
$Translations | ||
$LocaleName | boolean |
public setTranslation ( mixed $Code, string $Translation = '', $Save = false ) | ||
$Code | mixed | The code to provide a translation for, or an array of code => translation values to be set. |
$Translation | string | The definition associated with the specified code. If $Code is an array of definitions, this value will not be used. |
public translate ( string $Code, string $Default = false ) : string | ||
$Code | string | The code related to the language-specific definition. Codes that begin with an '@' symbol are treated as literals and not translated. |
$Default | string | The default value to be displayed if the translation code is not found. |
return | string |
public $DeveloperContainer |