Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Moon Doan 1 post 21 karma points
    Apr 24, 2024 @ 07:51
    Moon Doan
    0

    How to create more languages for users to change UI Backoffice CMS?

    I am using version 13.2.2.

    I installed it via Net Cli

    dotnet new umbraco -n MyCustomUmbracoProject

    How to add new Languages (languages that Umbraco doesn't support)?

    enter image description here

  • UCP 9 posts 99 karma points
    Apr 24, 2024 @ 08:00
    UCP
    0

    Hi Moon,

    Adding new languages to the Umbraco backoffice that aren't natively supported by default requires a few steps, including creating new language files and potentially modifying some core Umbraco files. Here's a step-by-step guide on how you can add a completely new language to the Umbraco CMS backoffice:

    Step 1: Create Language Files

    Umbraco uses XML files to manage translations for the backoffice. These files are located in the /Umbraco/config/lang/ directory.

    Copy an Existing Language File: Start by copying an existing language file (such as en.xml for English) in the /Umbraco/config/lang/ folder. This file will serve as the base for your translations.

    Rename the File: Rename the copied file to match the locale of the new language you want to add (e.g., xx-XX.xml where xx-XX is the locale code for your new language).

    Step 2: Translate the Content

    Edit the XML file you copied and start translating the keys from English (or whichever language you copied) to the new language. Each key-value pair corresponds to different elements and labels within the Umbraco backoffice.

    <area alias="sections">
        <key alias="content">Content</key>
        <key alias="media">Media</key>
        <!-- Translate all necessary keys -->
    </area>
    

    Step 3: Add the Language to Umbraco

    Once you have your language file:

    Ensure the Language is Supported: If the language is not officially supported by Umbraco, you might need to manually add it to some core configuration files where languages are defined. This typically involves modifying C# code in the Umbraco source or using an Umbraco package that allows for dynamic addition of languages.

    Restart Umbraco: After adding the language file, restart your Umbraco application to load the new language settings.

    Step 4: Select the Language in the Backoffice

    To use your new language:

    • Login to the Backoffice: Go to the backoffice and log in.
    • Go to User Settings: Each user can select their language preference in their user settings menu found at the bottom-left corner of the backoffice under their profile name.
    • Change the Language: Select the new language from the dropdown menu in the user settings dialog.

    Step 5: Test and Adjust

    • Testing: Navigate through the backoffice to ensure that all labels, tooltips, and other interface elements are properly translated.
    • Adjustments: You might find areas that you missed or that don’t translate well. Adjust these in the XML file as needed.

    Additional Considerations

    • Updates and Maintenance: When you upgrade Umbraco, you need to ensure that your custom language files are preserved and updated if new keys are added in the default language files.

    • Community and Support: Consider contributing your language file to the Umbraco community or checking if there are existing projects or packages that support adding new languages.

    By following these steps, you should be able to add a new language to the Umbraco backoffice that isn't currently supported by default, enhancing accessibility for users who prefer that language.

    Hope it helps,

    UCP

Please Sign in or register to post replies

Write your reply to:

Draft