Reputation: 11
Kik has mentioned that it has 120M users from 225 countries. That way Kik should support localization for its UI and Kik apps also.
So, the question is how HTML5/JS application can get current user locale to show UI using user locale?
Thanks, Serg.
Upvotes: 0
Views: 169
Reputation: 4835
Kik is a mobile web browser. That means it follows the regular standards set out for browsers in terms of localization.
You have two basic options:
browser-side: JavaScript has access to a global variable tag denotes the language preference (navigator.userLanguage || navigator.language).
server-side: your server can check a header (Accept-Language) on the I coming request that denotes the locale and serve up different content. This is discouraged because it removes the ability to use a cdn or some high performant environment to serve content.
Upvotes: 2