iOS: How to change app language programmatically WITHOUT restarting the app?

This works for me : Swift 4 : Create a file named BundleExtension.swift and add the following code to it – var bundleKey: UInt8 = 0 class AnyLanguageBundle: Bundle { override func localizedString(forKey key: String, value: String?, table tableName: String?) -> String { guard let path = objc_getAssociatedObject(self, &bundleKey) as? String, let bundle = Bundle(path: … Read more

Javascript toFixed localized?

Late addition: with Number.toLocaleString() now available on everything bar IE 10 & below, this works, albeit rather long-winded: var n = 100.67287; console.log(n.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })); Using undefined or ‘default’ for the language code will use the browser default language to format the number. See developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString for full details. If you’re free … Read more

How to implement localization in Swift UI

When you look at documentation for Text you can see that it takes LocalizedStringKey not a String into its initializer: init(_ key: LocalizedStringKey, tableName: String? = nil, bundle: Bundle? = nil, comment: StaticString? = nil) It makes localizing very straightforward. All you have to do is: create a new file of type “Strings File”, call … Read more

How do I set CultureInfo.CurrentCulture from an App.Config file?

I don’t know a built-in way to set it from App.config, but you could just define a key in your App.config like this <configuration> <appSettings> <add key=”DefaultCulture” value=”pt-BR” /> </appSettings> </configuration> and in your application read that value and set the culture CultureInfo culture = new CultureInfo(ConfigurationManager.AppSettings[“DefaultCulture”]); Thread.CurrentThread.CurrentCulture = culture; Thread.CurrentThread.CurrentUICulture = culture; Also, as … Read more

How to make iOS app name localizable? [duplicate]

I assume you mean the Bundle Display Name that appears on the device’s home screen: You should create a localized file called InfoPlist.strings similar to the Localizable.strings file that you use for the usual text snippets. In the InfoPlist.strings you can localize the different keys from your Info.plist. To localize the app name add: “CFBundleDisplayName” … Read more

How to localize bundle display name in iPhone app?

Here’s some instructions: Create a new empty file called InfoPlist.strings Open up the Navigator (cmd-opt-0) and select the first pane Click the plus for a localization Xcode (4.3) goes a bit funny and deselects your file. It’s placed it into a localization folder (probably called en.lproj in the item’s original folder. Re-select it in the … Read more

Proper localization of a WinForms application

I’ve just completed a C# .Net 3.5 project with a similar problem. We were writing WinForms plugin for an existing multi-lingual application with 8 languages (including English). This is how we did it: Create all our forms and UI in the default language, English. Put all our internal strings in a resource file (stuff not … Read more