Search code examples
iosxcodelocalizationuistoryboardgenstrings

Change genstrings generated key (Object ID) extracted from Storyboard for localization?


I pressed the Localize... button on my storyboard to generate a strings file so that the storyboard may be localized into other languages. In one the strings file that corresponds to a storyboard, I see something like this:

"orz-58-mzb.text" = "We are always looking for bright, energetic individuals to represent us.";

I'm wondering if I can change the key field orz-58-mzb.text to something with more meaning such as faq.answer.23.text so that it can be used in other platforms like Android? I noticed in the Storyboard editor, the Object ID cannot be changed (see screenshot). Is there any other way to change the key?

Xcode screenshot of Object ID


Solution

  • There's no way to change the key, but you can add a comment in the Notes field on that same UI. That string gets passed on to the translator via the generated Xliff, and is the best way to communicate meaning behind the string you want translated.