I'm looking for a way to update stringsdict localization files over-the-air without having to release a new version in the appStore. So ideally I want my stringdict files on a webserver, and the iOS app should download these files from the website and update the local strings.
After doing some research, I realized that we cannot update files in the bundle it was shipped in however I found some reports saying we could store/load localizations in/from the application support folder.
source #1
source #2
source #3
Can this also be applied to stringsdict files because I'm trying but no success so far.
Use it in custom SwiftUI views to make them ready for localization. Enable the "Use Compiler to Extract Swift Strings" build setting to extract LocalizedStringKeys from code when exporting for localization in Xcode. Format your strings to internationalize your code, and style them with Markdown.
Adding New LocalizationOpen Info tab, and click “+” button under Localizations section. Then choose a language you want to support from the dropdown list shown. XCode opens a dialog showing resources to be added for the new language.
Add localization files to your Xcode project This file works with key value pairs, with each key representing a string, one file per language. That's these keys that will then replace strings in your code. To create this file, go to File > New > File , search for Strings File andname it Localizable. strings .
Basically you need to create a .bundle
with your new strings and make your app download it. After that, I think it's possible to create a NSBundle
object using your freshly downloaded translations and swizzle a couple of methods from the main NSBundle
currently used by the system.
I've tried something similar, but found out that it's much easier to integrate an existing service such as Smartling or Lokalise. They already have an SDK that allows you to update your translation over the air.
Also I found it's much easier to manage all my translations there.
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