Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 2.59 KB

I18N.md

File metadata and controls

58 lines (41 loc) · 2.59 KB

Internationalization / Localization

We use transifex for localization.

The process for localization is:

  1. Export localization source strings from Xcode

    • Open EduVPN.xcworkspace in Xcode
    • In Xcode, open the Projects and Targets pane
      • In the Project Navigator (keyboard shortcut: Cmd+1), select "EduVPN" at the top left
    • Click on Product > Export Localizations
    • Select a location to save (say "eduVPN/i18n"; Xcode will create a directory with a bunch of files inside)
    • In Localizations, ensure only English - Default Localization is selected
    • Click on the Export button

    The directory will now have an en.xcloc directory. Inside that, under Localized Contents, there will be an en.xliff file. This is our localization source.

  2. Import localization source strings into Transifex

    When starting with a fresh app (like a new app or new redesign of an app):

    • Log in to Transifex
    • Under the eduVPN apple (macOS/iOS) project, select Resources
    • Click on Add Resources to import the en.xliff file (use drag and drop -- the file picker doesn't work because it doesn't go inside the xcloc package)

    When the app gets updated and the source strings change, we might want to update the strings in Transifex:

    • Log in to Transifex
    • Under the eduVPN apple (macOS/iOS) project, select Resources
    • Click on the en.xliff resource
    • Click on Update source file to import the en.xliff file (use drag and drop -- the file picker doesn't work because it doesn't go inside the xcloc package)
  3. Translate strings in Transifex

  4. Export localized strings from Transifex

    • Log in to Transifex
    • Under the eduVPN apple (macOS/iOS) project, select Resources
    • Click on the relevant en.xliff file
    • Click on the language whose translations need to be imported
    • Click on Download for use
    • Save the .xlf file somewhere
  5. Import localized strings into Xcode

    • Open EduVPN.xcworkspace in Xcode
    • In Xcode, open the Projects and Targets pane
      • In the Project Navigator (keyboard shortcut: Cmd+1), select "EduVPN" at the top left
    • Click on Product > Import Localizations
    • Select the .xlf file downloaded from Transifex
    • Click on the Import button
    • If prompted on where we should import into, select EduVPN.xcworkspace (I don't think it matters what we choose here), click on Choose
    • Xcode will show the currently used strings on the right and the being-imported strings on the left
    • Click on Import
    • Commit the changes