You need to build your custom logic around it. This is how I would do it:
Step 1: Keep all the localizations in a plist on server. Just to make data dynamic. There would be file for each language & region. Something like myLocalization_en_CA.plist
& myLocalization_en_FR.plist
. Typically this can be done in DB which is easy to maintain.
Step 2: On app launch, load this localization plist from server and save it locally. May be in Documents
directory. Key thing here is, based on your device region, you would need to download all the localisation files that speaks that language. This step can be streamlined, if at launch time, you could know the exact language to be used in that region. For instance, in Canada, both English and French is spoken, so if at launch time you can deduce the language, say French, then fetch only myLocalization_en_FR.plist
.
Step 3: Write a utility method and pass the key for the current label/string to be shown on screen. This method should also take a parameter like fr_CA
covering both locale and region and then pick up the file by merging myLocalization_
with the passed string.
Step 4: Once correct file is picked in above utility method, simply fetch the value for the passed key.