The standard Slate exports for country values, like citizenship and address, show the full country name. To satisfy external system requirements that countries be represented by country codes, you can use translation codes to export countries as ISO Alpha-2, ISO Alpha-3, FIPS 10-4, or custom country code values.
How translation codes work for country values
For string-based translation codes, you’ll create a translation code for each country value that should return a code. After the Country Code translation key exists in your database, you can use it to export ISO Alpha-2, ISO Alpha-3, FIPS 10-4, and custom country codes for each country. If you use custom country codes, edit the translation codes manually or update them in batch.
The export values for these translation codes are as follows:
Export | Code |
|---|---|
Export Value | ISO Alpha-2 |
Export Value 2 | ISO Alpha-3 |
Export Value 3 | FIPS 10-4 |
Export Value 4 | Custom |
Export Value 5 | Custom |
📝 Note
Some countries do not have a code for every standard code type. For these countries, the associated export value is blank. For example, Ashmore and Cartier Islands has a FIPS 10-4 code, but it does not have ISO Alpha-2 or ISO Alpha-3 codes. Export Value and Export Value 2 are intentionally blank for that translation code.
Adding or updating translation codes
Country code translation codes are managed in Database → Translation Codes. Create or import the Country Code translation key before using it in exports. For steps to create translation keys and translation codes manually, see Translation Codes.
Because country code lists contain 253 translation codes, batch import is typically the faster way to add or update country code values. For many values, add or update translation codes in batch with the Translation Code Import source format from Database → Source Format Library.
Editing translation codes
Edit a small number of country code values from the Translation Codes tool:
Go to Database → Translation Codes.
Select the Country Code translation key. If your database has many translation keys, use the search box to find the Country Code key.
Select the translation code to edit. Use the Search box to find a specific translation code.
Update the export values.
Select Save.
Using translation codes
Use translation codes in exports in the Query Builder, Report Builder, and Rules Editor. Set Export Value to one of the Translation Code options, and then select the translation code key.
For example, to export a country's ISO Alpha-3 value, set Translation Value to Export 2 Value and set Translation Key to Country Code.
