Advanced Multi-Lang Support | Yext Hitchhikers Platform
What You’ll Learn
In this section, you will learn:
- Best practices for translating hardcoded text
Translating Hardcoded Strings in Templates
When supporting multi-lang templates, the recommended best-practice is to pull as much content as possible from the platform entities and minimize hardcoded strings in the template.
By avoiding hardcoded strings, you can leverage all the power of Content language profiles to generate language-agnostic templates.
Nonetheless, there may be times when you must include hardcoded strings in your template, but still require translation. We recommend using the internationalization framework, which integrates well with a React-based Pages application.
We recommend the following tutorials for integrating i18next into a React application:
While third-party tools like i18next that support translation integrate well with Pages, we strongly recommend parameterizing your Content templates with stream-based data. Doing so will speed up your development process and allow for easier content management through the in-build Content and Streams system.