Monday, March 18, 2024
HomeiOS Developmentswift - The right way to programmatically take away particular localized language...

swift – The right way to programmatically take away particular localized language in iOS?


I’ve localized my app into 4 totally different languages.
I did’t use String catalog and adopted an previous Localizable.strings method.

I need to specify programmatically what languages needs to be out there for the consumer.
As an instance I would like this type of a way in my AppDelegate:

func setPreferredLanguages(_ languages: [String]) {
   /// ...
}

So if I name setPreferredLanguages([“en, de”]), consumer will not have the ability to see aside from English and German languages in system’s Settings -> My app -> Language(most well-liked language).

I’m looking for a option to “cover” localizations in a runtime.
I want to offer solely 2 out of 4 languages to the top consumer however with out precise deleting .lproj information.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments