App Loader offers an app called Languages. This is customizable and gives you the choice to upload country specific settings, which are called locales. Take a look at local planet page eg en_GB
By customizing means: Select a locale like de_DE and click on Upload. Now you have stored the information on your Bangle.js.
Keep in mind that only the 6x8 font can handle char values > 127.
The app Settings is using this locale to translate some words into you language , see attached pictures.
var locale = require('locale');
// day of week for today
// normal
console.log(locale.dow(new Date()));
// Mittwoch
// short
console.log(locale.dow(new Date(), 1));
// Mi
// name of month for today
// normal
console.log(locale.month(new Date()));
// März
// short
console.log(locale.month(new Date(), 1));
// Mär
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
App Loader offers an app called
Languages
. This is customizable and gives you the choice to upload country specific settings, which are called locales. Take a look at local planet page eg en_GBBy customizing means: Select a locale like
de_DE
and click on Upload. Now you have stored the information on your Bangle.js.Keep in mind that only the 6x8 font can handle char values > 127.
The app
Settings
is using thislocale
to translate some words into you language , see attached pictures.Existing translation set:
That allows to display
Yes
as meaning in you local likeJa
and so on.Code snippet
Or get the day and month name in the local language
Code snippet
Snippet with all possible function for
locale
Hope you now have an idea what this app can be used for and you start adding locales to your apps.
If your language is missing or has typos, please create issues or pull request on github.
2 Attachments