# Managing App Localizations

The ARwayKit Sample App utilizes the [Unity Localization package](https://docs.unity3d.com/Packages/com.unity.localization@1.3/manual/QuickStartGuideWithVariants.html) to configure the localization settings.

**You will need to modify the localization strings to remove any mention of ARway** if you want to customize your own app with unique branding.

## Choosing a Default Locale <a href="#choose-a-default-locale" id="choose-a-default-locale"></a>

Follow this [guide ](https://docs.unity3d.com/Packages/com.unity.localization@1.3/manual/QuickStartGuideWithVariants.html#choose-a-default-locale)by Unity to select which locale your application will use by default.

## Importing and Exporting <a href="#importing-and-exporting-csv-files" id="importing-and-exporting-csv-files"></a>

The Unity localization package offers three ways to modify and export: CSV, Google Sheets, and XLIFF.

### Importing and Exporting CSV files <a href="#importing-and-exporting-csv-files" id="importing-and-exporting-csv-files"></a>

You can use the CSV (Comma Separated Values) format to import and export [String Table Collections](https://docs.unity3d.com/Packages/com.unity.localization@1.3/manual/StringTables.html). This makes it easier to work with translators who use CSV for translation; you can export String Table Collections from Unity to CSV files, send them to the translator for modification, and then re-import the modified files back into Unity.

#### Exporting the CSV

1. Navigate to "Window -> Asset Management -> Localization Tables"

   <figure><img src="https://4128853559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlDytDSBRx8P4ZZXD57DA%2Fuploads%2FHlaxId5bgBo44wgvjtJ5%2Fimage.png?alt=media&#x26;token=3901202a-22b2-4c64-940f-35577a2ea5ca" alt=""><figcaption><p>Navigating to Localization Tables</p></figcaption></figure>
2. In Localization Tables window, click on the "Edit Table Collection" tab to open the table collection with the name "StringTable\_Localization"

   <figure><img src="https://4128853559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlDytDSBRx8P4ZZXD57DA%2Fuploads%2FR5sTdOy2WCZpM9Ibhxmz%2Fimage.png?alt=media&#x26;token=ba6be4ca-91fd-4094-b682-feaeed32a2c4" alt="" width="375"><figcaption><p>StringTable_Localization Table Collection</p></figcaption></figure>
3. Click the three vertical dots at the top right of the window and select "Export -> CSV…".

   <figure><img src="https://4128853559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlDytDSBRx8P4ZZXD57DA%2Fuploads%2FXmf69TANTw8FhGNQIzAk%2Fimage.png?alt=media&#x26;token=75f8e72c-4de3-4df0-b113-1b587f8090e6" alt=""><figcaption><p>CSV export menu</p></figcaption></figure>
4. Then select a location to store the CSV and then save.

After you have exported the CSV, you can make changes to the different string stored in each cell.

#### Importing the CSV

1. Navigate to "Window -> Asset Management -> Localization Tables"

   <figure><img src="https://4128853559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlDytDSBRx8P4ZZXD57DA%2Fuploads%2FHlaxId5bgBo44wgvjtJ5%2Fimage.png?alt=media&#x26;token=3901202a-22b2-4c64-940f-35577a2ea5ca" alt=""><figcaption><p>Navigating to Localization Tables</p></figcaption></figure>
2. In Localization Tables window, click on the "Edit Table Collection" tab to open the table collection with the name "StringTable\_Localization"

   <figure><img src="https://4128853559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlDytDSBRx8P4ZZXD57DA%2Fuploads%2FR5sTdOy2WCZpM9Ibhxmz%2Fimage.png?alt=media&#x26;token=ba6be4ca-91fd-4094-b682-feaeed32a2c4" alt="" width="375"><figcaption><p>StringTable_Localization Table Collection</p></figcaption></figure>
3. Click the three vertical dots at the top right of the window and select "Import -> CSV…".

   <figure><img src="https://4128853559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlDytDSBRx8P4ZZXD57DA%2Fuploads%2Fjtu9zqdS9lzVvC3MMjYF%2Fimage.png?alt=media&#x26;token=b0eeef5d-1086-471f-8907-ebda1f078c7b" alt=""><figcaption><p>CSV import menu</p></figcaption></figure>
4. Select CSV file to be imported.
   * Note: When importing, make sure that the structure / headers of the CSV file that was exported remains the same.
5. Once imported, check the data in the Table Collection to ensure that the imported data is correct.

### Google Sheets

The Unity Localization package allows you to synchronize [Google Sheets](https://docs.google.com/spreadsheets) data with the content of a String Table Collection. By default, this feature can synchronize a String Table’s keys, values, and comment metadata. You can also add support for additional data through scripts.

More information can be found on the [Localization Unity package](https://docs.unity3d.com/Packages/com.unity.localization@1.3/manual/Google-Sheets.html) page.

### XLIFF <a href="#xliff" id="xliff"></a>

XML Localisation Interchange File Format (XLIFF) is a standardized way to store localization data. It is supported by many different Computer Aided Translation (CAT) tools, which allows for a smoother translation pipeline when working with translators.

You can export String Table Collections from Unity to one or more XLIFF files, modify them with external CAT tools, and finally re-import them back into Unity with the updated translations.

More information can be found on the [Localization Unity package](https://docs.unity3d.com/Packages/com.unity.localization@1.3/manual/XLIFF.html) page.

## Building the Localization Assets <a href="#preview-and-configure-your-build" id="preview-and-configure-your-build"></a>

To use the localized assets in the player, you must build the Addressables player content.&#x20;

After updating source codes, take these conditions into account to determine if building Addressable is necessary:

* If this is the initial build after checking out the source code.
* If Addressable hasn't been built successfully in previous attempts.
* If there have been modifications to String Tables.

To do this, in the Addressables window:

1. Navigate to "Window -> Asset Management -> Addressable -> Groups".
2. In the Addressables Groups window, click on "Build -> New Build -> Default Build Script".

{% hint style="info" %}
When making any changes that affect localization strings, you will need to update the Addressables Groups.
{% endhint %}
