JS library_locale - gd-99/symbiogd GitHub Wiki

Methods

This class hasn't any method.

Static methods

  • Boolean Webos.Locale._check(locale) : Check if a string represents a locale. A locale is a string containing the language code followed by the region code, separated by an underscore (e.g. fr_FR, en_US...). Language and region codes respects ISO 3166-1 alpha-2 (two lowercase letters).
  • String locale The string.
  • Object Webos.Locale.getAll() : Get a list of all available locales.
  • [Webos.Locale](JS library_locale) Webos.Locale.get(name) : Get a locale.
  • String name The locale's name.
  • [Webos.Locale](JS library_locale) Webos.Locale.getDefault() : Get the default locale.
  • Boolean Webos.Locale.exists(name) : Check if a locale exists.
  • String name The locale's name.
  • [Webos.Locale](JS library_locale) Webos.Locale.current() : Get the current locale.
  • Webos.Locale.load(callback) : Load the user's locale.
  • [Webos.Callback](JS library_callback) callback The callback.
  • String Webos.Locale.detect() : Detect the user's locale. If the locale can't be detected, nothing won't be returned.
  • string Webos.Locale.toPosix(originalTag) : Convert a locale tag to POSIX format. POSIX format is : [language[_territory][.codeset][@modifier]]
  • string originalTag The original tag.
  • boolean Webos.Locale.compareTags(a, b, strict) : Compare two locale tags.
  • string a The first one.
  • string b The second one.
  • boolean strict True if territories must match too.
  • Webos.Locale.set(locale, callback) : Set the user's locale.
  • String locale The locale's name.
  • [Webos.Callback](JS library_callback) callback The callback.
  • undefined._loadTranslations() : Load this library's translations. The event "translationsloaded" will be triggered after that.
⚠️ **GitHub.com Fallback** ⚠️