os-js / OS.js

OS.js - JavaScript Web Desktop Platform
https://www.os-js.org/
Other
6.9k stars 821 forks source link

doSetLocale(l) receives wrong format #104

Closed livep2000 closed 9 years ago

livep2000 commented 9 years ago

Morning,

(in OS.js-v2/src/javascript/api.js, line 244)

Sorry to be the little PITA. :)

String l in this function receives the value 'nl'. It wants 'nl_NL' and switches to default locale. ( en_EN )

To proof this is the case, did a dirty patch:

l = l + "_" + l.toUpperCase();

Wich is working. I think the OSjs.API.getLocale should return the proper format?

Imre

andersevenrud commented 9 years ago

@livep2000

This was actually solved by fixing up the global locale getter function. Thanks :)

https://github.com/andersevenrud/OS.js-v2/blob/master/src/javascript/utils.js#L450

livep2000 commented 9 years ago

Thanks to you, my customers now read Dutch :)