Internationalization & Localization - Mura Docs v7.0

Internationalization & Localization

Mura utilizes resource bundles to internationalize various areas of the user interface, making the code locale-independent. Each site in Mura contains a directory of ".properties" files located under {context}/{SiteID}/includes/resourceBundles/.

These ".properties" files, or resource bundles, are named to indicate the language code, and country code. For example, the language code for English (en) and country code for United States (US) would be represented as "en_us.properties". If Mura cannot find a direct language and region match, it will search for a language match. If a locale's language cannot be found, Mura will fall back to its default of English, or "en.properties".

The file itself is comprised of key-value pairs. The keys remain the same throughout each of the ".properties" files, and the value is translated into the file's designated language. If Mura is searching for a specific key-value pair within a translation, and cannot locate it, Mura will fall back to the English translation.

You shouldn't edit these files directly. If you do, you'll run the risk of losing your edits or changes whenever you update your site to the latest version. Instead, you should create your own ".properties" files, and place them in a specific directory of Mura (shown below) in order for them to be auto-discovered.

{context}/{SiteID}/includes/themes/{ThemeName}/resourceBundles/

Lookup Hierarchy

Mura uses the following lookup hierarchy for resource bundles. If a ".properties" file containing a key-value pair is found in the first directory, it will use that value and stop the lookup process. Otherwise, it will continue through each subsequent directory until found.

  1. {context}/{SiteID}/includes/themes/{ThemeName}/resourceBundles/
  2. {context}/{SiteID}/includes/resourceBundles/
  3. {context}/requirements/mura/resourceBundles/resources/