This is useful when you want to add less commonly-used language and local combinations on an Optimizely Content Management System (CMS) installation.
CMS takes the list of the languages you can enable for a site from the languages that are installed on the host operating system. This may be a problem because the available languages can vary between different machines. If you have a language enabled in your CMS database which is not installed on your target machine, then an error occurs on start-up, which disables the entire site.
To add a new language, you need to install it on your operating system through the `
CultureAndRegionInfoBuilder` class in `
System.Globalization`. This lets you create a new language from scratch or by copying it from an existing language, (although you will have to run the code in the context of an Administrator account for it to work).
## Add a language to the list of available languages
The following code sample shows how to use `
CultureAndRegionInfoBuilder` to create and register a new language based on an existing language, in this case creating Hong Kong English (**en-HK**) from UK English (**en-GB**). You need a reference to _sysglobl.dll_ in your project for this to compile.
Custom cultures such as ”sv-gb” and "en-fr" are not supported for solutions running in Optimizely Digital Experience Platform (DXP). See Optimizely DXP - Multisite Development.
Run the code.
Start Optimizely CMS.
Go to the admin view.
Select **Config tab **>** Manage Website Languages**.
Click **Add Language**. Your new local combination is ready to use.