mirror of https://github.com/espruino/BangleApps
Added Latvian diacritics in "charFallbacks" Added "lv_LV" locale Sorted "charFallbacks" alphabetically Also just looking at the ISO map, maybe charFallbacks should be also transformed the same way? I guess for all lowercase diacritics we have to add uppercase ones too, right? |
||
---|---|---|
.. | ||
ChangeLog | ||
README.md | ||
locale.html | ||
locale.png | ||
locales.js |
README.md
Languages (locale)
Country-specific app internationalisation.
This is not an app, but instead it is a library that can be used by other applications or widgets to display messages.
Usage
Some menus that pop up are translated automatically, but if you're
writing an application you can use the locale
library to
do all the translation for you.
See https://www.espruino.com/Bangle.js+Locale for full examples.
// Date to date string (long)
>require('locale').date(new Date())
="Donnerstag, 02. April 2020"
// Date to date string (short)
>require('locale').date(new Date(),1)
="02.04.2020"
Bangle.js has a locale
library built in that is just a standard
British English (en_GB
) localisation - so you can use locale
in your apps without requiring users to have this Language library
installed.