Localizing static elements of articles and the Add-Edit Article Form
In the article Localization of articles and other dynamic content in EasyDNNnews we have dealt with localizing dynamic elements of the article. In this text we wish to explain how all static elements of the article visible to visitors can be localized, along with the entire administrative interface of the EasyDNNnews module visible by authors and administrators.
What exactly are static elements of the article?
Static elements of the article are those appearing in each article, such as: Author, Number of views, Comments, Article rating, Categories, Tags, etc. All of these elements can be localized to any desired language.
Localizing static elements is a simple procedure. In order to localize static elements for a particular language, that language must be added to your DNN portal.
In the DNN Admin menu click on Languages. A page similar to this will be opened:
Here you can see if there is another language added to your site, apart from the default language. If there is no language available to translate the static elements to, you can add it by clicking on the button Add New Language and selecting the language you wish to install.
After adding the language you wish to translate the interface to, click on System icon. A page similar to this will be opened.
Click on the menu Local resources > Desktop Modules, and select EasyDNNnews or any of the satellite modules you wish to localize. Then select App_LocalResources and you will be presented with the list of all available controls. Controls' names will clearly indiate which part of the EasyDNNnews module they are related to.
Static parts of articles can be localized by the controls ViewEasyDNNnews.ascx.resx and SharedResources.ascx.resx. Other controls are related to the administrative interface of the module.
After selecting a control we wish to localize, on the right side of the window a table with all labels is displayed. On the left side there is the field Default value, and on the right side there are fields Localized Value.
In order to localize a value, it is enough to enter the translation into the field Localized Value, and this should be repeated for each label we wish to translate. Values which are not translated will be displayed in the default (English) language.
When translating is completed, it is necessary to click the button Save Resource File at the bottom of the page. If translating takes a considerable amount of time, it is recommendable to occasionally save changes. Otherwise, we could be automatically logged off due to prolonged inactivity, and all our work would be lost.
All localization values are contained in resx files you can copy and use at your other web sites or share with other users. Resx files are saved in the folder: DesktopModules/EasyDNNnews/APP_LocalResources/
You can also export translations by clicking on the button Create Language Pack while you are in Language management. On the next page click on the Module and select EasyDNNnews with all of its satellite modules.
After clicking on Create, DNN will display a green pop-up message, informing you about the successfully created language pack and its location.
If you wish to learn more about localization in DNN, not included by content localization of the EasyDNNnews module, you can find more information at help.dotnetnuke.com page.