Installing Localization Files¶
In this guide you will download and install community managed localization files to localize the Admin of Orchard Core CMS.
What you will need¶
- The current version of the .NET Core SDK. You can download it from here https://www.microsoft.com/net/download/core.
- A text editor and a terminal where you can type dotnet commands.
- An already running Orchard Core CMS website. You can follow the guide Creating an Orchard Core CMS website if you haven't done it yet.
Downloading the localization files¶
Localization files are managed by the community on the Crowdin website. Anyone can provide custom languages or contribute to existing ones.
For this guide we will download the French language.
- Click on French, a page with the list of all
.potfiles should appear.
- Click on the Download or Upload button on the top right of the page.
- Select Download, a zip file named
fr.zipwill be downloaded by your browser.
Extracting the localization files¶
The zip file that you downloaded needs to be extracted in the
Localization folder of your Orchard Core CMS website.
- Create a folder named
your_site_rootis the location of your website.
- Extract the file
The result should look like this:
Configuring the supported cultures¶
By default a new Orchard Core CMS website will only accept the default system culture. This step will configure it to accept French as an alternate language.
- Open the Admin section of Orchard Core CMS by opening the browser on https://localhost:5001/admin.
- In the Configuration, Settings, General section click on Add or remove supported cultures for the site.
fr | Frenchthen click Add.
- Click on the Manage Settings menu item link which redirects to the General settings page.
- Click on Save, the site is reloaded.
Enabling localization and testing the site¶
To enable Orchard Core CMS to use these new files, we need to enable the Localization feature.
- In the Modules page search for Localization and click Enable. If the feature is already enabled you don't need to do anything.
- In the current url, add
?culture=fr, the link should look like https://localhost:44300/blog/OrchardCore.Features/Admin/Features?culture=fr.
At that point most texts should be displayed in French.
From now on if a browser is configured with French as its default culture, the Admin will be displayed using the French text translations we downloaded.
?culture=fr is just one way to simulate that the current request should use French as the UI culture.
You just downloaded and enabled a new localization in Orchard Core CMS.