Nativescript Localize Dynamic Language Switching - localization

Is it possible to dynamically switch language from within the Nativescript app. I'm using the Nativescript Localize plugin.
I'm building a user preferences page where a user can select their preferred language from a drop down.
If it's not possible with Nativescript Localize, does anyone have any experience doing this with another method/plugin?
It appears there are Angular ways to do this so I was hoping they'd work but they seem to limited to the browser since they use localStorage.
Angular2 i18n language switch
angular 5 change locale dynamically for i18n

Switching the language programatically is not supported by the plugin, but the plugin can be modified to do that.
On iOS, instead of getting main bundle you could modify the plugin to get bundle based on your language preference, here is an example written in Objective C.
Similarly for Android, you would have to get the Resources based on your locale preference instead of the active one.

Related

how to current language used in tvml application using tvjs for localisation

Im a beginner in tvOS application . Im using tvml and tvjs. I want to do localisation in my application. How will I get the current language used and interface language used in application.
Use Settings.language.
Also check out: https://developer.apple.com/documentation/tvmljs/settings

How to switch language for one element of iOS-App?

My question:
How to switch language for one element of iOS-App ?
I have app with different languages locale there
function of switch locale (language) work fine.
but I can't to understand how to make function for my special element (button) that switched only part of my app to another language.
So I can't to find any information about right solution.
Any one please help
I don't think UIKit provides such a fine grained localization support (i.e., language per view). The current locale is an application wide setting, made available by Locale.current.
You may need to track such settings yourself and configure the desired views accordingly.

Cannot automate localization in my iOS generated App

I am generating an iOS app via some tools. No need to concern about them, I have to do things that way.
Localization
The app is generated just fine, however I need to have the app be available for a certain set of languages. My app is actually a cross-platform app, and i am handling translation at JavaScript level. So my app actually picks the proper strings.
I just need to have my app be recognized in the Store as supporting those languages
Manual approach
I used to handle this by automatically generating language folders in Resources. So my automation scripts, would basically take the list of supported languages (say it, en and fr) and generate the following folders and files in my project:
MyApp
|
+-MyApp-Info.plist
+-Resources
|
+-en_US
|
+-Localizable.strings
+-it_IT
|
+-Localizable.strings
+-fr_FR
|
+-Localizable.strings
And Localizable.strings is just a placeholder file with a C-style comment in it.
Not working anymore
This did the trick so far, but now it is not really working anymore. The store recognizes my app to be only an English app, it does not list French and Italian anymore.
I am targeting iOS 8.0+ and developing on latest version of XCode.
How can I fix this?
Try renaming the localization folders so they have the ".lproj" suffix. Use the naming scheme as defined in the Apple Internationalization and Localization Guide under Managing Strings Files Yourself.
I would also add at least one string resource in the Localizable.strings file for at least one of the languages. At least one localized string resource may be needed to flip the bits and mark the app as supporting the additional languages.

Custom Cordova IOS keyboard

I am working on a Cordova app for which the client insists we have a custom keyboard for numeric input that looks native; the goal is similar to a keyboard that comes up with PayPal.
Here is the problem: we need to do this without touching the way things work for Android in our app. This probably means we need to create a cordova plugin, but I have read that creating custom keyboard is looked down on by the folks over at Apple (see this old post about it).
I've had a very difficult time finding any documentation on how to do this with Cordova on IOS, which makes me lean towards rolling a solution inside of Cordova using a jquery library. My question has two parts:
1: If possible, how does one create a custom keyboard for html5 inputs in Cordova as an IOS plugin?
2: If this is a lost cause, what existing jquery plugins would you recommend instead?

can I change an app's language based on an iOS Device's default language?

I have Created one simple in-house app for ipads. I would like to have 2 language for that app. Based on ipad default language App language should be same as ipad default language.
I tried to goggling it but didn't find proper answer.
Is it possible?
How can I do that?
Any Links, examples any documents?
You can use TSLanguageManager SDK in order to do that. In basic, you define different string for each languages. Then the SDK checks your language and converts your defined strings/view elements into that language string. Also, you can switch between language by using this SDK in your app.
This is a good starting point for internationalization and localization resources for iOS apps.

Resources