AEM i18n dictionary case sensitivity and key handling
✨ This content is AI generated and could be inaccurate. Generative AI Terms
This article describes how Adobe Experience Manager’s i18n dictionary handles keys with different capitalization and provides guidance for managing translations.
Description description
Environment
Adobe Experience Manager (AEM) (all versions)
Symptoms
When using the i18n dictionary in AEM, words that differ only by capitalization (such as Previous and previous) are treated as separate keys. Translations for each variant must be entered individually in the dictionary.
- If two entries exist for the same word—one with an uppercase letter and one with a lowercase letter—AEM will select the translation that matches the exact case of the source string.
- For example, requesting a translation for the lowercase form will only use the lowercase dictionary entry; the uppercase entry will not be considered.
This can result in duplicate entries and inconsistent translations if not managed carefully.
Cause
AEM’s i18n dictionary implementation is case-sensitive, so keys with different capitalization are treated as distinct and require separate entries.
Resolution resolution
Follow the steps below to resolve the issue.
- When adding entries to the i18n dictionary, include all required case variations (such as
Previousandprevious) if both forms are used in your application. - Review your application’s source code to standardize the casing of keys passed to the i18n translation API, if possible, to minimize duplication.
- If you want a single translation to apply regardless of case, ensure that all case variants are present in the dictionary, as AEM’s i18n mechanism is case-sensitive by design.
- For bulk management, consider scripting the addition of both uppercase and lowercase variants for each key as needed.
- Verify that translations are correctly applied for each case variant in your application.