Adding strings localization files from a server
We are building an application with dynamic data that we wish to localize.
We know how to localize strings in iOS and Android but in this case the data will be downloaded dynamically from the server so we will need to download the localization files dynamically.
Usually we store the strings files inside language folders. how can we do that when the file is coming from the server?
- Client-server synchronization over REST
- fixed header scrolls/drags in jquery mobile
- Why are there two Cordova www folders?
- The developers of this app have not set up this app properly for Facebook Login?
- Using camera on Phonegap app with only HTML input, without Camera API
- Phonegap - navigator.app.backHistory() not working on HTML back button
2 Solutions Collect From Internet About “Adding strings localization files from a server”
how can we do that when the file is coming from the server?
You can’t because the app bundle is not writable on iOS devices.
There is, however,
NSLocalizedStringFromTableInBundle(), which lets you specify a different bundle from which you can load the
.strings file. I haven’t tried but I suppose this bundle can also reside in your app’s Documents or Library folder.
Yes, it’s possible, but not using standard means. Check this github repository for simple and elegant solution.
It uses .json file which contains localization info and may be downloaded from server. All controllers need to subscribe to notifications sent by localization class and implement a method responsible for (re-)setting all texts in view.
- How we can set the Light Content style of Status Bar in iOS 9 for whole application?
- Replacement for AFJSONRequestOperation in AFNetworking 2.x
- Rounding in Swift with round()
- Asynchronously load image in uitableviewcell
- How can I use constraints AutoLayout with to specify a different layout on landscape vs. portrait without using code?
- iOS – How to limit the MapView to a specific region?
- How to create array of unique object list in Swift
- How do I get NSJSONSerialization to output a boolean as true or false?
- Swift conversion: ERROR – UnsafeMutablePointer
- Why are UIViewController touchesBegan, touchesMoved & touchesEnded only being called when the first of two touches begins, moves or ends?
- Objective-C Exceptions
- Swipe to Delete and the “More” button (like in Mail app on iOS 7)
- How do I create dynamic views in swift?
- Why won't UIScrollView scroll fully after adding objects? Using storyboard, ARC, and Xcode 4.5.2
- Allow Full Access check in keyboards iOS10