Blog

Kentico: How to install alternate languages for the Admin Interface

By Cathy Dew on November 30, 2017

It’s not just your visitors that will need an alternate Language, don’t forget your Editors and Administrators.

A couple if months ago, we discussed different features and tweaks to Kentico revolving around Language and Cultures.

All of these articles deal with how to help your site with different languages on your “public” pages. Kentico also allows you to change the language options for the Administrative interface, but that requires you download and install a localization pack for each language you want to enable, or to create a custom localization pack. Today, we’ll show you how to update Kentico with a new localization pack and enable multi-language support for the Editor and Administrative pages.

 

Installing a Localization Pack

Kentico currently has 20 different localization packs available for download. Peruse the list and see if the languages you need are already available. Download the target language and unzip it. Inside the zip file you will find a file with a .RESX extension.

The .resx file needs to be copied over to the Kentico hosting server. The target directory is:

~\CMS\CMSResources

(Note: ~ is just short hand for the path where you installed Kentico web application. This could be something like c:\inetpub\wwwRoot, or c:\webRoot\Kentico_v10\.)

Once you have copied the new localization pack to the CMSResources directory, you need to restart the application. Via the Kentico Admin interface, navigate to System and click “Restart Application”. This will force Kentico to re-read the available resource files and make them available for use.

 

Designing your own Localization Pack

The language pack file is just a text file with an XML structure that outlines all the labels displayed for each Admin Interface element. If you don’t see an existing localization pack in the language you need, you can translate your own. The recommended path for translating your own localization pack is to start with a copy of the English localization pack.

In the ~\CMS\CMSResources directory, look for a file named “cms.resx”. Copy this file using the following as the naming pattern:

cms.<culture-code>.resx

Replace <culture-code> with the proper two-part culture code for your new language. E.g.

cms.da-dk.resx

for Danish – Denmark. You’ll then need to open the file and translate all the text between the “<value>..</value>” tags.

<data name="invalidlogonattempts.unlockaccount.accountlockedlink" xml:space="preserve">
<value>You can contact the administrator or {0} to receive an email containing instructions on how to unlock your account.</value>
</data>
<data name="invalidlogonattempts.unlockaccount.accountunlocked" xml:space="preserve">
<value>Your user account was successfully unlocked.</value>
</data>
<data name="invalidlogonattempts.unlockaccount.errortext" xml:space="preserve">
<value>The selected account doesn't exist or has already been unlocked.</value>
</data>

Becomes

<data name="invalidlogonattempts.unlockaccount.accountlockedlink" xml:space="preserve">
<value>Du kan kontakte administratoren eller {0} for at modtage en e-mail med instruktioner om, hvordan du låser din konto op.</value>
</data>
<data name="invalidlogonattempts.unlockaccount.accountunlocked" xml:space="preserve">
<value>Din brugerkonto blev låst op.</value>
</data>
<data name="invalidlogonattempts.unlockaccount.errortext" xml:space="preserve">
<value>Den valgte konto eksisterer ikke eller er allerede låst op.</value>
</data>

Make sure you don’t just use Google Translate to convert all the values. There will be translation errors using a machine translator that will embarrass you.

Once your translation has been validated, copy the RESX file back to the CMSResources directory and restart the Kentico Application.

Kentico has been updating the core CMS about once a year, with each upgrade make sure you compare the latest cms.resx file with your translated resx files and update the transitioned files with any new fields / values from the latest release. Also, think about providing your newly translated resource file to Kentico for listing in their localizations page.

 

Activating a Language for the Admin Interfaces

In order for the localization pack to be available for the Admin interface, the target culture needs to be set as a “UI Culture”. To set this, or verify that it’s set, as Admin - open the Localization application and click into the Localization tab. You can then search for the target culture by name or code and verify that “Is UI Culture” is set to “yes”.

If you need to set the target culture to a UI culture, edit the culture by clicking the edit icon, and check the “Is UI Culture” check box.

If you haven’t installed the target localization pack correctly, Kentico will warn you that it can’t find the proper resource file.

Once enabled, your editors and administrators can change to the new culture via their My Profile – Preferred user interface culture.

The administrator can also set the default UI Culture for each user directly, via the Users Application.

Lastly, if you want to change the default UI Culture for everyone you need to update the Kentico web.config file. Look for a key “CMSDefaultUICulture”, and update it for new two-part culture code.

<add key="CMSDefaultUICulture" value="da-dk" />

Kentico’s flexibility to display different language extends from the front to the back end, and providing an administrative interface in the native language of your editors and administrators is key to ensuring new content is added to your website, as well as, properly maintained.

If you are just starting out using Kentico or need help managing your legacy Kentico environment, 2Plus2 is a Kentico Gold Partner and would love to help you get the most out of your Kentico system. Go online to schedule a free consultation with our team or call 510-652-7700 today.

Cathy Dew
Cathy Dew – CEO + Information Architect
Cathy focuses the company on our mission – Real results. Every time. Information architect and strategist, Cathy is passionate about making software work well – the function, the feel, the result.