- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i want to create a multilingual app with XDK. In the tab "emulate" is under "App Globalization - Locale Name" a dropdown menu with different languages. How can I use it?
With navigator.globalization.getPreferredLanguage I got an error. Is this my mistake or don't work in XDK?
Thanks a lot.
Axel
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Axel!
I'm sorry, but I don't understand your request, my brain is on strike this morning.
If I respond your post is to tell you how I get the language of the device to use it in a multilingual app (well, at this time it has only three languages, but in the future it could have more).
I use this code:
var idiomaNavegador = new String; if (navigator.language) idiomaNavegador = navigator.language; else idiomaNavegador = navigator.browserLanguage; idiomaNavegador = idiomaNavegador.substring(0, 2);
With this code I've got the first part of the language, for example: "en-US" become en, "es-es", become "es".
I don't know if it's the best way to know the language of the device, but it's a simple one that rules fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This one was great José, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any plugin ou tutorial to prepare a APP to multilingual? I am looking for it too.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page