Google Cloud Translation, AWS Translate, and Lokalise Connectors
Descope's Google Cloud Translation, AWS Translate, and Lokalise connectors power automatic localization within one's authentication flow, allowing for the adaptation of language in your product to users' specific country or region. This article will go through setting up the connectors and enabling them in your flows.
Note
When the localization is performed, Descope will take the primary attribute and drop the region specific. An
example would be a user in the es-MX
locale, Descope will only load es
and will translate for the user based
on this locale.
Setting up Google Cloud, AWS Translate, and Lokalise Connectors using 3rd Party Keys
Before diving into localization, set up your preferred connector—either Google Cloud Translation, AWS Translate, or Lokalise.
Navigate to Connector
- Go to your Descope dashboard
- Navigate: Dashboard -> Connectors
- Choose “Google Cloud Translate,” “AWS Translate,” or "Lokalise"
Connector Setup
Fill out the necessary fields to link the chosen service with Descope.
For Google Cloud Translation
Get your Service Account JSON and associated Project ID from Google Cloud by following the instructions here.
Now, complete the required fields:
- Connector name: Custom name for your connector. This will come in handy when creating multiple connectors from the same connector template.
- (Optional) Connector description: Describe what your connector is used for.
- Project ID: Your Google Cloud project ID.
- Service Account JSON: Service Account JSON associated with the current project.
Make sure the Cloud Translation API is enabled for your project. For more information, see here.
For AWS Translate
Get your AWS Access Key ID, Secret Access Key, and Region by setting up AWS Translate here.
Now, complete the required fields:
- Connector name: Custom name for your connector. This will come in handy when creating multiple connectors from the same connector template.
- (Optional) Connector description: Describe what your connector is used for.
- Access Key ID: Your AWS access key ID.
For Lokalise
Get your Lokalise API Token and Project ID by setting up Lokalise here.
Now, complete the required fields:
- Connector name: Custom name for your connector. This will come in handy when creating multiple connectors from the same connector template.
- (Optional) Connector description: Describe what your connector is used for.
- API Token: Lokalise API token. You can find it in your Lokalise Profile Settings under "API tokens" tab.
- Project ID: Lokalise project ID. You can find it in the project settings tab.
- (Optional) Team ID: Lokalise team ID. If not provided, the oldest available team will be used. Currently, the team ID is not displayed in the Lokalise UI, but you can find it in the list all teams API response.
- (Optional) Card ID: The ID of the payment card to use for translation orders. If not provided, the team credit will be used. Currently, the card ID is not displayed in the Lokalise UI, but you can find it in the list all cards API response.
- (Optional) Translation Provider: The translation provider to use ('gengo', 'google', 'lokalise', 'deepl'), default is 'deepl'.
Test & Save
- You can test if any of your connectors' configurations are working properly simply by hitting the
Test
button and viewing theTest Results
panel. - Finalize and save by clicking
Create.
Activating connectors
Navigate to Localization
- Navigate to Localization section within the Descope console.
- Select the applicable flow you want to localize from the dropdown, then click
Configure Localization
.
Configuration
Once you have clicked Configure Localization
, you will be prompted to select the connector, source language,
and target languages.
When you select the dropdown for Connector
, choose either the Google Cloud, AWS, or Lokalise connector that you previously
set up for translations. Additionally, you have the option to specify which Target languages
you want to support
for your user base, determining the languages your content will be translated into.
Once you have clicked Done
, the localization will automatically be generated for the flow based on the returned
translation. Below you can see an example configuration and the generated translation.
Manually Overriding Connector Translations
When you configure localization with a connector, you can manually override the translation. When you override the translation, you will see the override highlighted like the below example.
(Optional) Testing & Customization with Descope Web Component:
If you'd like to test your translation, you can either simply change the language in your browser settings or configure the locale
within the Descope component.
This is an example of an updated Descope flow component to include locale
.
You can learn more in the Web Component readme.
All supported locales are accessible in your dashboard, specifically within each flow's settings where localization was enabled earlier.