Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is 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