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)
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.
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:
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:
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With