DotNetNuke (DNN) is an open-source content management system (CMS) that utilizes Microsoft .Net technology and an MS SQL database. As one of the largest CMS platforms, DNN is known for its flexibility and customizability. DNN allows for multilingual functionality, which means the same website and functionality with multiple language content can be developed, and users will be able to see language specific versions of pages or content. Using a single platform, website owners may generate and manage content in numerous languages. DNN includes various capabilities that make it simple to develop and manage multilingual content.
Installation of DNN is straightforward, and its user-friendly design allows non-technical users to easily modify content by adding pages and changing layouts. The platform offers a vast array of modules that can be used to tailor the website's look and feel, as well as its functionality.
Moreover, DNN's built-in localization framework makes it simple for users to create multilingual websites. Initially introduced in DNN version 5, the content localization feature allows for the publication of various translations of website pages. In DNN version 7, this feature was considerably improved.
Content Localization Feature
Creating a multilingual website with DNN's content localization framework is a simple process that can be completed in a few steps.
Firstly, the content localization feature must be enabled. This can be achieved by accessing Host -> Host Settings (found under the Other Settings tab), selecting the Allow Content Localization option, and clicking Update.
DNN utilizes resx files to enable localization. These files are stored in the App_LocalResources folder. DNN offers a built-in resource label skin object that can be utilized to display localized text. This skin object contains an ID tag that represents the ID of the resource label. The way it works is that DNN searches for the ID value, which in this example is lblResourceText. It then looks for a resource record defined in the resx file named lblResourceText. If it finds the record, it uses the defined value specified in the file; otherwise, it uses the default value tag specified in the Label object that contains the value Resource Text.
Enabling Content Localization
DNN's Content Localization feature enables site admins to create copies of their sites in different languages and grants translators access to the relevant content. When content localization is enabled, it generates a translator role (e.g., Translator (EN-AU)) for each supported language. It also activates the Localization tab for all site pages. Only users with Edit Content permissions can translate pages.
- To access the Languages tab, go to Settings > Site Settings.
- To add the required languages, click on the Add New Language button. Please keep in mind that due to a page refresh issue, the Enable Language On/Off toggle may initially appear greyed out after adding the language.
- Enable the Allow Content Localization option.
- Click Save
- Before proceeding, ensure that the Site's Default language is selected. If you proceed without doing so, your default language will become locked, and you will not be able to change it in the UI.
- Click Enable Localized Content
- If required, enable the Make All Pages Translatable option. This option enables the translation of all pages that are in the default language and generates copies of them for each of the enabled languages.
- Click on the Enable Localized Content button once more. Your site's pages may take some time to be copied into the new localization. Please note that this is a direct copy of the pages without any translation taking place. The translation is the responsibility of the site's assigned Translator users.
- You will now see a new section under the Languages tab. This section lists the enabled languages and provides the following information for each language
- Number: This shows the total number of pages and the percentage of pages that have been localized.
- Translated: This shows the total number of pages and the percentage of pages that have been translated.
- Active: Indicates whether localized content is activated or not.
Technical Overview of DNN's Multilingual Feature
The modular architecture of DNN's multilingual capability makes it simple for developers to build multilingual websites. There are three main parts to it:
- Core Framework: The fundamental functionality for building and administering multilingual websites is offered by the DNN core framework. It has capabilities like translation management, language selectors, and language packs.
- Localization Support: Developers can produce language-specific versions of their website's content thanks to DNN's localization capabilities. Some of its features include resource files, language-specific skins, and modules.
- Third-Party Modules: Developers can produce language-specific versions of their website's content thanks to DNN's localization capabilities. Among its features are resource files, skins tailored to particular languages, and modules.
The following steps are involved in implementing DNN's multilingual feature:
Install Language Packs: Install language packs for each language you want to support to create a multilingual website in DNN. DNN supports more than 50 languages, and language packs can be downloaded from the DNN website @ https://www.dnnsoftware.com/community/download/language-packs
Localization Support: Localization support in DNN allows developers to create language-specific versions of their website's content. It includes resource files, language-specific skins, and modules.
Develop multilingual versions of your content: You can build language variants of the content on your website after multilingual support has been enabled. Go to the page or module you wish to translate, click the Actions menu, and then choose Translate from the menu that appears. The translated material should then be entered after choosing the language you want to translate it into.
Configure the Language Selector: A language picker included in DNN enables visitors to choose between many language versions of a website. Go to the Language menu and choose Language Options to customize the language selector. Following that, choose the languages you wish to see in the language selection and set the language selector's preferences.
Manage Translations: To guarantee that all content is current and accurate, you must manage translations. Go to the Language menu and choose Translation Management to manage translations. Review the content of your website's translation status after that and make any necessary modifications or corrections, explained well at https://www.dnnsoftware.com/community-blog/cid/155042/content-localization-walkthrough
The multilingual functionality of DNN offers a strong framework for building and maintaining multilingual websites. You may quickly generate and manage multilingual content in DNN by following the above-described methods, allowing your website to reach a wider audience and boost user engagement.
Multilingual custom module in DotNetNuke
Use the usual DotNetNuke module development procedure to create the module.
Create localized resource files to add multilingual support. The translated text for each language the module supports can be found in these files.
Define the module's language-specific content. Depending on the user's choice of language, retrieve the relevant language resources using the DNN localization APIs.
By defining the module manifest file to contain the supported languages, you can make sure the module can be localized. This guarantees that the module package contains the necessary language files and that the module is displayed in the localization interface.
To confirm that the text is translated accurately and that the module operates properly, test it in each supported language.
Developing a multilingual custom module is not a complicated task. The process involves collecting all the label names for each supported language and mapping them to the respective resource culture files. The DNN framework automatically displays the appropriate language content based on the page's culture.
As experienced DNNDevelopers, we have honed our skills over years of practice with the DotNetNuke framework, and we can confidently say that we are experts in developing multilingual DNN sites. We are more than happy to explain how we can efficiently execute this process to ensure that your DNN site delivers the best possible results.