Improve localization usability and maintainability

Thinking about this powerful tool that is localization in Xcode projects, I came with the problem that in case you have to change a key of the localizable file you will also have to change it in the whole project looking where it is used. This results in a lot of time spent in looking where the string was placed and changing it through all the project. Due to this, I came with the idea of having a script that creates a cocoa class with static constants based on the localizable file keys. Doing this, we will be able to increase maintainability and code faster because we could use the autocomplete for getting the strings we need.

Do you think it is a good idea? Would you be interested in the script?

Hi @Ulay,
That is a wonderful idea, I am sure many would be interested in something like this.

While there are others that have thought of this, there is a utility called R in swift which is similar to the R resources in Android, which does something similar to what you have just suggested, it goes even further and creates enum constants for images, storyboards, strings, etc.

cheers,

Jayant

1 Like

This topic was automatically closed after 166 days. New replies are no longer allowed.