Skip to main content

Internationalization

Internationalization (i18n) and Localization (l10n) are crucial in the development of an app for a global audience, such as Figuro's goal of operating in several countries in Latam.

  • Internationalization involves designing and developing the app in a way that it can support multiple languages and regions.

  • Localization involves adapting the app to a specific locale or region, which includes translating content, adjusting design elements, and accommodating cultural differences, like date and time formats, currency, region-specific holidays, and more.

In Figuro's case, as different countries have various legal terms for insurance even when they speak the same language, it is essential to have a well-planned i18n and l10n strategy. This will help ensure that the app is accessible and user-friendly to people in different countries, regardless of language or cultural differences.

In general, the best practices for i18n and l10n include the following:

Separate text from code

All text should be separate from the code and stored in a separate file, storage or en external databse/service. This makes it easier to translate the content without having to modify the code and allows for dynamic content based on team changes or user input.

Use language and region codes

Use language and region codes to identify the user's preferred language and location, and automatically display content in the appropriate language.

Allow for dynamic content

Allow for dynamic content based on user input, such as currency or date formats.

Design with scalability in mind

Design the app with i18n and l10n in mind from the beginning. This will save time and resources in the long run.

For TypeScript and Python, there are specific tools and libraries available to facilitate i18n and l10n:

For TypeScript, the most popular libraries include i18next, react-i18next, and ngx-translate. These libraries provide easy-to-use functions for managing translations and integrating with various frameworks. For Python, the popular libraries include Babel, gettext, and Flask-Babel. These libraries provide tools for managing translations and localization in Python-based projects.

Resources

  • Adobe: Building in JavaScript with Internationalization (I18N) in Mind: Practical tips and tricks on developing, designing, testing, and deploying internationalized JavaScript apps.

  • Internationalization with TypeScript: A guide to implementing internationalization in TypeScript using the i18next library. Covers topics such as setting up the i18n configuration, using translation keys, and handling plurals and variables in translations.

  • Python's gettext documentation: Official documentation for the gettext module in Python, which provides a framework for internationalizing Python programs. Includes examples for creating and using message catalogs for translations, as well as tips for managing plural forms and domain-specific translations.