How to export a base development language XLIFF file from Xcode 6 and then re-import it to configure additional localizations. (E.g. export en.xliff
file and use it to create fr.xliff
file if you want to add French to an English development language project)
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
I am posting this as an "answer your own question" because I spent hours trying to figure this out and as far as I can tell Apple hasn't documented it.
The Apple documentation implies it should be sufficient to rename an exported base language XLIFF with a language prefix to be able to import. I.e. if the base localization is English, you should be able to create a file that you can import for French localization just by renaming it from
en.xliff
tofr.xliff
.Renaming the file is not enough. You also need to add a
target-language
attribute to everyfile
element.From this:
<file original="MyApp/MyApp-Info.plist" source-language="en" datatype="plaintext">
To this:
<file original="MyApp/MyApp-Info.plist" source-language="en" datatype="plaintext" target-language="fr">
Now you can import the file to Xcode and it will create the new localization