Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

(no description)

File Size: 285 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

t3lib_l10n_Locales:: (8 methods):
  initialize()
  getLocales()
  getLanguages()
  getIsoMapping()
  getTerLocales()
  getLocaleDependencies()
  getTerLocaleDependencies()
  convertToTerLocales()


Class: t3lib_l10n_Locales  - X-Ref

Locales.

Defining backend system languages
When adding new keys, remember to:
- Add character encoding for lang. key in t3lib/class.t3lib_cs.php (default for new languages is "utf-8")
- Add mappings for language in t3lib/class.t3lib_cs.php (TYPO3/ISO, language/script, script/charset)
- Update 'setup' extension labels (sysext/setup/mod/locallang.xlf)
That's it!

initialize()   X-Ref
Initializes the languages.

return: void

getLocales()   X-Ref
Returns the locales.

return: array

getLanguages()   X-Ref
Returns the supported languages indexed by their corresponding locale.

return: array

getIsoMapping()   X-Ref
Returns the mapping between TYPO3 (old) language codes and ISO codes.

return: array

getTerLocales()   X-Ref
Returns the locales as referenced by the TER and TYPO3 localization files.

return: array

getLocaleDependencies($locale)   X-Ref
Returns the dependencies of a given locale, if any.

param: string $locale
return: array

getTerLocaleDependencies($locale)   X-Ref
Returns the dependencies of a given locale using TER compatible locale codes.

param: string $locale
return: array

convertToTerLocales(array $locales)   X-Ref
Converts an array of ISO locale codes into their TER equivalent.

param: array $locales
return: array