With Uniform, brands have access to localize any experience. Localization can be applied to compositions (e.g., a page or an App screen), content entries, components, and data from connected sources.
With the rise of AI, there are great opportunities to leverage an AI service for localization. Uniform works with AI of choice, allowing brands to bring the AI service they want, anything from OpenAI to a custom service built on brand LLMs.
Once connected, AI can be used for localization across Uniform’s capabilities; below are examples of how to apply AI with Uniform.
This recipe will use OpenAI as example Generative AI integration within Uniform and will assume you installed and configured this integration with your own OpenAI API key.
You can use other generative AI integrations Uniform supports and even add your own. Learn more about how to install and configure a generative AI integration here.
In this example, we want to leverage AI to localize a specific field value to the currently active locale.
The steps for this are simple:
Settings
> AI
> Prompts
Translate to a current locale
as a name.Translate the following copy into <insert_Current_locale_variable_here>, this is the copy: <insert_Current value_variable_here>
This prompt is using system variables
Current locale
andCurrent value
and you will need to insert those using the connect icon:
Context and Availability
panel.Check out video below showing this use case in action:
We can also leverage AI to translate the content of a specific component into a specific language. The use case is that you can have a component, like a banner, call to action, hero etc., and then translate all of the content across the fields.
To enable this, we used the following steps:
Settings
> AI
> Prompts
Translate all content to current locale
Translate the given JSON document into ${$locale}: ${$propertiesCurrentValues}. Respond only with the translated JSON object with the same structure, exclude everything else in the response.
This prompt is using system variables
Current locale
andProperties current values
and you will need to insert those using the connect icon:
Context and Availability
panel.The video below shows how this is enabled:
The final example uses the same prompt we enabled in the previous example to translate a full content entry to a new locale. The video below highlights how that is done: