📂Locales

Internationalization and Localization

The locales directory plays a critical role in ensuring that your application speaks the language of its users, literally. In modern software, it's essential to address the global audience, and this means catering to multiple languages and regional preferences. The locales directory in the Cillop Architecture facilitates this by serving as a repository for translations and locale-specific content.

Importance of Internationalization (i18n) and Localization (i10n)

  • i18n (Internationalization): It's the process of designing your software so it can potentially be adapted to various languages and regions without engineering changes.

  • l10n (Localization): It involves adapting the internationalized software for a specific region or language by adding locale-specific components and translating text.

Sample Locale File

Let's peek into a sample locale file, en.toml, to understand the structure and usage:

project-name/locales/en.toml
HTTP_OK = "Ok."

product_create_failed = "Product creation failed."
product_invalid_id = "Invalid product id."
product_not_found = "Product not found."

Last updated