# Internationalization

Dynamic Framework uses the i18next library to internationalize applications and websites. This allows the content and user interface to be adapted to different languages and regions.

Dynamic Framework employs good practices to achieve efficient internationalization, including:

  • Separation of texts and code: Separating the texts of the application from the source code simplifies the management and updating of content in different languages, without the need to modify the code.
  • Translation files: Use JSON or YAML translation files to store text strings in different languages. Thus, each file represents a language and contains a set of keys with their respective translations.
  • Descriptive keys: Encourage the use of descriptive keys that refer to the context and purpose of the text, instead of directly using texts as keys in translation files. This makes it easier to identify and maintain translations.
  • Hierarchical structure: Organizing translations in a hierarchical structure helps manage large applications with multiple components and sections. In addition, this structure helps to maintain order and consistency in the translations.
  • Variables and parameters: Using variables and parameters in text strings makes it easier to include dynamic information in translations. This is essential to maintain consistency and understanding in different languages.
  • Plurals and singular/plural forms: Providing support for managing pluralization rules in different languages is essential to adjust translations according to quantity or context.
  • Contextual translation features: Providing functions for contextual translation allows you to translate the same text in different ways, depending on the context in which it is used.
  • Language and region tags: Providing a library compatible with language tags (such as “en” for English) and language-region tags (such as “en-US” for American English) makes it easier to adapt to regional differences.
  • Dynamic translation loading: Supporting dynamic translation loading can be useful for large applications, with multiple modules or for single-page applications.
  • Plugins and extensions: Offering the plugins and extensions that the Dynamic Framework community has developed adds additional features, such as real-time translation or compatibility with specific frameworks.

These practices contribute to making internationalization more efficient and manageable in frontend applications.