Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamic localization.strings definitions for an iOS app?

Is there a way that I can download Localizable.strings from my web-server to support multiple languages without rebuilding my iOS app every-time?

The default method need the language file to be in resources directory NOT documents directory of the bundle and *Lang_Name.lproj* directory.

Is there a custom category or addition to NSLocalizedString to use lang_name.strings file from downloaded directory (documents)

like image 432
palaniraja Avatar asked Jan 19 '11 13:01

palaniraja


People also ask

How do I add iOS localization to my App?

iOS localization: Step-by-step Guide. 1 Step 1: Create Localizable.strings file. Localizable.strings stores application strings as key-value pairs for each language. Let’s create this file ... 2 Step 2: Adding languages. 3 Step 3: Working with translations. 4 Tip #1: The shortcut. 5 Tip #2: Easy testing.

What is the localization process?

As mentioned before, the localization process involves keys and values. Key is a unique identifier that is used in the source code; when the application is served to the user, keys are replaced with the corresponding translations for the language set by the user. Let’s add two entries into the .strings files:

How do I create a local localizable string file?

Localizable.strings stores application strings as key-value pairs for each language. Let’s create this file for the base language first. Select File → New → File… or just tap Ctrl+N or Cmd+N. Search for strings and you will see Strings File in Resource window:

How to localize strings file in Microsoft Word?

Search for strings and you will see Strings File in Resource window: Choose Strings File and name the file Localizable: Now, let’s select Localizable.strings file in the Navigator.


1 Answers

Short answer: no.

Long answer: you can achieve something similar, but you'll need to code your own wrapper for it. You can't dynamically swap out the localised strings file, but you could create your own NSLocalizedStrings replacement that, say, downloaded an XML file and parsed it upon app launch to get the required strings.

like image 139
lxt Avatar answered Oct 07 '22 00:10

lxt