1
0
Fork 0
BangleApps/apps/locale
Anton 10b2ff9449 Remove currency from documentation 2024-03-20 10:24:13 +01:00
..
ChangeLog Deprecate currency information 2024-03-20 10:23:32 +01:00
README.md Remove currency from documentation 2024-03-20 10:24:13 +01:00
locale.html Remove currency from documentation 2024-03-20 10:24:13 +01:00
locale.png Added locale loader courtesy of @MaBe's extremely hard work! (ref #105) 2020-03-04 16:42:44 +00:00
locales.js Fixes to Catalan locale: right icon for all regions, shorter long data pattern and fix lang code 2024-03-01 20:55:27 +01:00
metadata.json just doc changes 2022-04-26 10:31:29 +01:00

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 provide locale-friendly

  • Dates
  • Time (12h/24h)
  • Days of the Week
  • Months
  • Distances/Lengths/Speed (metric/imperial)
  • Temperature (°C/°F)

Usage

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.