Localization

API Reference: Locales

FoxNose allows you to create multiple localizations within each project environment to manage multilingual content efficiently. Locales help you deliver tailored content to diverse regions and audiences, ensuring your content reaches global markets effectively.

Default Locale

Every environment requires at least one locale, which is set to English (en) by default. You can change the default locale to any language at any time, but this change does not affect existing data tied to the current locale.

If you only need one locale, no additional setup is required. You can add more locales later as your content needs grow, with no restrictions on the number of supported languages.

Fallback Mechanism

When retrieving data, if a localized field lacks content for the requested locale, FoxNose automatically uses the corresponding data from the default locale. This ensures that content is always available to your users, even if translations for a specific language are incomplete or missing.

The fallback occurs dynamically during data retrieval, meaning:

  • Missing content in a non-default locale is automatically replaced with default locale content
  • Your applications always receive complete data, preventing broken user experiences
  • You can gradually build translations without affecting live content delivery

Managing Locales

Adding a New Locale

When you add a new locale:

  1. Immediate Availability: The locale becomes accessible via the Flux API instantly
  2. Fallback Content: Until you provide translations, the API returns content from the default locale
  3. Gradual Translation: You can translate content progressively - each saved translation immediately becomes available

Deleting a Locale

When you delete a locale:

  1. Immediate Unavailability: The locale data becomes inaccessible through the Flux API immediately
  2. Data Retention: The actual data remains in the database and continues to consume storage space
  3. Complete Removal: To fully remove the data, you must:
    • Create a new document version
    • Delete versions containing data for the deleted locale

Was this page helpful?