Web UI component: j-Locale


  • Info
  • HTML
  • JS
  • CSS
  • Meta

j-Locale

This component sets current browser locale (number format, date format and time format) according to the navigatior.language.

  • easy usage
  • singleton
  • path will contain current's browser locale
  • sets DEF.dateformat and it creates environment value called [ts]

Environments:

  • [ts] full timestamp
  • [date] only date
  • [time] only time

Output:

{
    dt: 'yyyy–MM–dd', // date format
    nf: 1,  // number format: 1 = 100 000.123, 2 = 100 000,123, 3 = 100.000,123, 4 = 100,000.123
    fdw: 0, // first day of week
    tf: 24  // time format: 12, 24
}

Methods:

  • component.use(language)

Author