A single extension method for string to change it from English to a pseudo
language.
What can it be used for?
It can be used to translate any text into a pseudo locale form in order for localisation testing.
What the pseudo language is intended for is to show up text that is, for lack of a better term hard
coded. This means that it is programmed into the code and will not change regardless of what
language the user views the product in. This language is created by mapping characters to alternatives
with the main aim to use special characters that look similar, this means that although the character
set differs the sentence in pseudo form should still be readable. Usually as well as this brackets
surround the text.
There are several benefits of using a pseudo locale over an existing language and are as follows;
There is a one to one relation with your native language. Unless you are lucky enough to have a
fully multilingual team, you should assume people can only understand their native language (or the
native language of the company). By using a pseudo language you can verify that the sentence you
thought was there is correct.
Contradicting the first point pseudo languages can also catch text that should not be localised,
for example addresses or company names (In some cases, I am aware that brand names change depending
on the country) should be the same regardless of the language.
The character set should contain a variety of characters to test your page can handle characters
from non latin origins such as Hindi or Russian.
A pseudo language for right to left reading can be just as easily created.
Not all languages when translated produce text of the same length, for this we add extra padding.
We go with the worst case scenario which is a language adds extra characters. On average a 30%
increase to the text length is enough by using a character such as '!' in this case.
Automated tools such as Selenium Webdriver can be used to find any text that hasn't been translated.
They can scan the page for text and any without opening and closing brackets can be shown as errors.
Prototype / Demos can use this to show localisation within the product.
using ToPseudoLocale;
namespace Translate
{
public class Program
{
public static void Main(string[] args)
{
string pseudo = "String to translate.".ToPseudo();
}
}
}