Before doing the internationalization time, each time writes an internationalized string to be to. strings inside the corresponding add resources, so it is easy to forget some of the international exchange of resources.
And it's very cumbersome to write. It's too hard to write.
Today's whim, just considering the internationalization of things, on the Internet to view the next information, there is a sharp weapon ah.
The way to write internationalization before is too low.
Here are one by one of the way.
Test
1, first of all, create a new project, feel free to write.
2, feel free to write a few international resources, similar to:
Nslocalizedstring (@ "Hello 1", nil);
3, the key is here.
Open the console
Enter the directory of your current project
After entering the directory, enter: Genstrings-o en.lproj *.m
I we can see that there is only one file under the En.lproj folder, but when we enter the command line, there is one more magical file: Localizable.strings, which is our international resource.
Then all we have to do is add this file to the project. We can see that the international resources are in it just now. And it's all international resources, not the internationalized resources of a single. m file.
Reference connection: http://blog.csdn.net/king_jensen/article/details/18523129
It's written in detail.
iOS command line gets all the international resources in the project and integrates