Search This Blog

June 23, 2020

How to test localization using Selenium?

Today someone asked me about how to test localization of the Portal using Selenium. This is the good question.

In our React Portal (Microsoft Dynamics 365 Customer Service Insights) , we need to support 43 languages.  

For example, if we want to test in Spanish, we can just add lang= ‘es-ES’. 

  ChromeOptions options = new ChromeOptions();

  options.AddArgument($"lang={language}");

When you run the test, the Chrome window will be launched in Spanish. Is that simple?

The following 6 languages are not supported in our React Portal because it still shows English.

Malay = "ms-MY";

Basque = "eu-ES";

SerbianCyrillic = "sr-Cyrl-CS";

SerbianLatin = "sr-Latn-CS";

Kazakh = "kk-KZ";

Galician = "gl-ES";


Last year I opened the bug to bugs.Chromium.org. Finally, they closed it and status was “Won’t fix”.

If you see the same issue above, do not feel surprised.


No comments: