LocalizationKit 1.0.12 release brings in the ability to localize more components just by adding a localization key. The new components now available are:

  • UIButton
  • UITextField
  • UIBarButtonItem
  • UIBarItem

Overall the main aim of the LocalizationKit is to make the life of a developer that much easier by taking localization out of the equation. To achieve this LocalizationKit will keep extending it’s component support, although you can always create your own components easily.

Localize a UIButton – as Apple states this intercepts touch events and sends it to a target object. However, a lot of the time the UI Shows a message on the button that needs to be localized. The localization can be for multiple different states of the button. Hence LocalizationKit creates a new key for the states automatically. So if you assign a localization key of “My.Button” ┬áthe kit will expose localization keys for translation of “My.Button.Normal” to change the translations on the normal state of the button.

Localize a UITextField – on first glance this component may not appear to need translation applied to it. However it does. The component itself has properties like placeholder text which can be static strings and could need translations. Therefore the LocalizationKit when assigning a Localization Key to a UITextField such as “MyTextField” it will expose the key of “MyTextField.Placeholder” to the web ui for translation of the text prompt.

Localize a UIBarButtonItem – if you have a UIBarButtonItem you may want to translate the title text for it. LocalizationKit will pick up if the UIBarButtonItem has a title specified and if it is as least one character before it will expose it as a translateable string within the web ui.