1

I am looking for inputs to install Custom Languages into Containers based deployment.

Generally in ASP.NET MVC application (IaaS) we need to follow steps mentioned at https://sitecore.stackexchange.com/a/4298/303

Application Details:

  • Sitecore Version: 10.1.1

  • Implementation: Headless

  • Client Side Framework: ReactJS

  • Deployment: Containers

Please share your thought process and suggestion to achieve above requirements.

2 Answers 2

2

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:

5
  • Thanks @Jeroen for the details. It means for every new custom language above steps required?
    – Amit Kumar
    Commented Dec 13, 2021 at 18:14
  • No, just have RegisterCustomCulture.exe register all the languages you want. All these steps need to be performed only 1x, and some 1x per container type, e.g. you probably need to perform step 2 for CM and CD separately
    – Jeroen
    Commented Dec 13, 2021 at 18:17
  • Ok. My question is, suppose I added one Custom language today and performed above steps. And after some days I need to add another language then as per my understanding same steps needs to be followed.
    – Amit Kumar
    Commented Dec 13, 2021 at 18:21
  • Yes! In that case you will need to build new containers with the new languages included. In our case this is part of our CI/CD process so adding a new language is not different from any other code change.
    – Jeroen
    Commented Dec 13, 2021 at 18:24
  • Thanks for explaining the details.
    – Amit Kumar
    Commented Dec 13, 2021 at 18:40
1

It is worth following the process in this StackExchange with custom culture, and totally avoiding making changes to the OS layer. How to add custom language to Sitecore on Azure PaaS Web Apps?

There are 2 ways to map the language requests from the Headless application.

  1. Do the language mapping on the front end application, so that the layout service requests calls the languages available in Sitecore
  2. Use a custom Language Resolver on the Sitecore side to Rewrite or Map the languages from the sc_lang parameter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.