-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# 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 | ||
|