- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a created an app and I'm testing it on a IPad. The IPad has the system language set to Swedish. But in the app, labels for native controls display in English. For example, ff I long press on a input in the app I get "Paste". If I do the same thing in any other app i get the Swedish text "Klistra in" instead.
Why does it display in English? Shouldn't it always use the system language for native controls? Can I change this somewhere?
For Android Crosswalk it works. If the unit has Swedish as system language, the labels display correctly in Swedish.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tried using the Cordova Globalization plugin? See this page for reference: https://github.com/apache/cordova-plugin-globalization and in the new XDK (2496) you can get the plugin via the core Cordova plugin list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Paul F. (Intel) wrote:
Have you tried using the Cordova Globalization plugin? See this page for reference: https://github.com/apache/cordova-plugin-globalization and in the new XDK (2496) you can get the plugin via the core Cordova plugin list.
I actually did although I don't see why it should matter. And it didn't help. I don't understand why it just works on Android but it is wrong in IOS? Its for the basic input controls.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The behavior is depending on the target platform, the XDK does not dictate that behavior. You can think of it as being similar to the difference between writing a web app for Chrome vs. Firefox vs. IE vs. Safari, etc. See this blog for a little background.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, but does anybody then know how I can set the language that is used for labels/controls etc in the webview for IOS?
I still think it should automaticly use the same language as IOS is set to but it doesn't. I tried adding the globalization plugin but it didn't fix the problem and I can't find that it has any method for setting the language, just getting values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would do a search on StackOverflow for something like "phonegap cordova ios language settings" -- the Intel XDK creates Cordova apps (as does PhoneGap) so the fixes you find for a Cordova/PhoneGap app should work with the XDK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, find this: http://stackoverflow.com/questions/26324669/how-to-localize-cordova-ios-projects
That I need to add
<key>CFBundleLocalizations</key>
<array>
<string>es</string>
</array>
To .plist file. How do I do that with IntelXDK? I found this:
http://stackoverflow.com/questions/27153299/editing-ios-plist-file-in-windows-intel-xdk but is sems like it wasn't really supported?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That undocumented feature is probably still there, the intent is to support that sort of feature. Give it a try and see if it works. I'll also ask the build engineer to comment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is an undocumented feature for iOS builds. It should work although it is currently unsupported. Let me know if you run into any issues with using it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
p.s. Jonatan, please report back if it works and what you put into the additions.xml file to make it work so we can document for others. :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've made a feature request to see if we could get this added to the build settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dario -- based on the original post dates here and in StackOverflow -- I suspect this is no longer working. It was an experimental thing being done in the build system and, I suspect, it probably only worked with the now retired CLI 4.1.2 build system. Our build system was substantially rebuilt with the CLI 5.x releases, and this experimental stuff likely disappeared with that rebuilding because it was never a released feature. The feature request is still outstanding.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can get it to work with this plugin: https://github.com/escapedcat/cordova-plugin-localization-ios
-Downloaded the repo, changed plugin.xml for my language codes and imported in XDK as local plugin.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page