2

I need to know if localizable Strings files can dynamically be changed, I want to fetch and display the strings from my own server so that if a string has to be changed, a new build updated won't be needed.

I know that a localized string can be read from bundle in the following way but is there a way to actually change that dynamically?

NSString *danishLanguageBundle = [[NSBundle mainBundle] pathForResource:@"da" ofType:@"lproj"];
NSBundle* languageBundle = [NSBundle bundleWithPath:danishLanguageBundle];

NSString *characteristicsString = [languageBundle localizedStringForKey:@"CHARACTERISTICS" value:@"" table:nil];
Zeeshan Anjum
  • 148
  • 13
  • 1
    tell to server side they give localizable string in different Language.if your Language is english than tell to server they give english string if your Language da then send string in da language.for this functionality you need to send language type to server so your server easily understand – Jigar Jun 06 '18 at 05:43
  • 1
    if you are fetching from server why you are not display directly on UI in this you need to send only language code to server (server side manage like userid : 1 lan_code: Eng || 001) – Hardik Bar Jun 06 '18 at 05:43
  • [iOs app localization: loading strings from server](https://stackoverflow.com/questions/45555482/ios-app-localization-loading-strings-from-server) – MadProgrammer Jun 06 '18 at 05:43
  • See if [How can you switch localized Nibs within an app?](https://stackoverflow.com/a/17956710/790842) helps.. – iphonic Jun 06 '18 at 05:44
  • What I wanted to do was to leave the same localizable strings files unchanged and dynamically load them with strings from server. In this way my code will remain unchanged. – Zeeshan Anjum Jun 06 '18 at 07:58

0 Answers0