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 i18next internationalization framework, which integrates well with a React-based Pages application.

We recommend the following tutorials for integrating i18next into a React application:

  1. i18next Documentation
  2. How to properly internationalize a React application using i18next

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.

unit Quiz
+20 points
Daily Quiz Streak Daily Quiz Streak: 0
Quiz Accuracy Streak Quiz Accuracy Streak: 0
    Error Success Question 1 of 1

    True or False: It is possible to include content on a page that is not in the primary language of that page's locale.

    High five! ✋

    You've already completed this quiz, so you can't earn more points.You completed this quiz in 1 attempt and earned 0 points! Feel free to review your answers and move on when you're ready.
1st attempt
0 incorrect