Hello Enginners,
I'm still looking for a way that would make Localization much easier for developers in Xcode. The current implementation is more complex, and it creates many ways to duplicate keys and to have runtime issues. Avoiding magic keys is one of the best practices that we can have.
Proposal:
Localizable. string en
"HelloWorld" = "Hello World"
"NumberOfRooms" = "Number of Rooms are %d"Once the user writes into localizable string file. Xcode automatically will generate a struct file to be used in the project. So, a developer can use it in this way
Localizable.HelloWorld // print Hello World in en
Localizable.NumberOfRooms(value: 5) // print Number of Rooms are 5 in enThis practice will avoid magic keys in the source code. Also, it will push the developer to remove duplicate keys, and we can make sure one hundered percent developer hits the right key in the localizable file.
Best Regards,
Faisal