I had the same issue and avoiding custom culture was not an option. I reached out to Sitecore supports and this is what they came back with. I was able to successfully implement it with below guidance:
Please try using the following example to add a custom language(e.g. ru-US
):
1: Create a console application RegisterCustomCulture.exe
that will register a custom language in the Windows OS according to the article
2: Create a Dockerfile file to build a new custom image. For example:
FROM scr.sitecore.com/sxp/sitecore-xm1-cm:10.1-ltsc2019
COPY LanguageDefinition.Custom.config "c:\inetpub\wwwroot\App_Config\Include\zzz\LanguageDefinition.Custom.config"
COPY RegisterCustomCulture.exe "c:\RegisterCustomCulture.exe"
RUN "C:\RegisterCustomCulture.exe"
3: Add your custom language to the LanguageDefinition.Custom.config
config file;
4: Copy the required files(RegisterCustomCulture.exe, Dockerfile, LanguageDefinition.Custom.config
) to a build folder on your machine. For example to c:/build
.
5: Open the Powershell session, change the folder to the c:/build
, trigger building the new image for a Sitecore role (e.g. CM). For example:
cd "c:/build"
docker build -t xm1cm:10.1-ltsc2019-custom-culture .
6: Update your docker scripts to use custom imagexm1cm:10.1-ltsc2019-custom-culture
instead of the OOB ones.
7: Start Sitecore environment and add the language according to the article: