SDLocalize
The biggest feature of this solution is that it can complete projects that modify from a single-language project to a multi-language project without much modification to the old code. It also supports XIB control localization, without creating XIB files in different language versions.
How SDLocalize works:
First mark a set of controls that need to be localized
Then (viewDidLoad) fires a set of localization tasks when needed
SDLocalize will use the control's text as the text of the current control.
SDLocalize adopts a task-processing mode when designing, and does not pollute the project code and runtime. SDLocalize is essentially a task center that handles control UI styles and is completely independent.
= <>; = <>; = <>; ... [control0 sdl_defaultRegister]; [control1 sdl_defaultRegister]; control2.sdl_defaultRegister = @"-"; ... // Then at the right time (viewDidLoad), trigger a set of localized tasks// It then triggers a set of localization tasks when needed - (void)viewDidLoad { [SDLocalize defaultLocalize]; // Takes effect on all controls marked as default pages //[control0 sdl_localizeIfNeed]; //[control1 sdl_localizeIfNeed]; //[control2 sdl_localizeIfNeed]; // ... }
And supports dynamic format strings
control.sdl_dynamicFormat = @"My name is %@, %@ years old."; // XIB supported ... [control sdl_localizeWithFormateArgs:@[name, age]];
This is the end of this article about using SDLocalize to achieve efficient completion of iOS multilingual work. For more related SDLocalize to implement IOS multilingual content, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!