Sponsored By

Problematic Case Conversion in Turkish

Video games using the automatic capitalization very often face an issue with the Turkish "i" when the game reaches the LQA phase. In this article we explain the problem in detail and offer some solutions for fixing it.

IGDA Localization SIG, Blogger

November 27, 2017

3 Min Read
Game Developer logo in a gray background | Game Developer

By Laura Gutiérrez and Adolfo Gómez-Urda, IGDA Localization SIG Vice-Chairs

In video games, there is a very common issue with the Turkish language most gaming companies have to deal with when the game reaches the LQA phase. It is normally a result of the automatic capitalization of the letter “i”. Very often, translations are converted to upper case at runtime, after the translation process. And this conversion is sometimes done inappropriately by converting the lower case “i” into an “I”. But the Turkish upper case “i" looks slightly different than the upper case Latin “i".

In Turkish, the character “i” becomes “İ” when capitalized, while the “ı” (a Turkish-specific character) becomes “I” (which looks just like the Latin upper case “I”).

The out-of-the-box capitalization method implemented by developers or by localization tools by default is often the standard ‘toUpper()’, which doesn’t follow language-specific rules and will convert the “i” into an “I”. As for the lower case “ı”, it will simply fail to capitalize it at all. This will result in a very strange looking text in the game with uncapitalized characters and wrongly capitalized ones.

Let’s recap:

  • right capitalization in Turkish: i-> İ and ı -> I

  • wrong capitalization in Turkish: i-> I and ı -> ı

This is what the “i” should look like when properly capitalized: 

The first "i" is correctly capitalized

This is what it will look like when the auto-capitalization fails:

And finally, here is an example where the auto-capitalization of the special Turkish character “ı” fails (it should display as KALDIR):

Ideally, the ‘toUpper()’ conversion method should be avoided completely, even if your game is not localized into Turkish, since it can also cause other issues in other languages (for example, with the German “ß”, which should become “SS” when converted to upper case). If a specific string is to be displayed in upper case in game, it should be written as such in the string database that is sent out for translation. Translators will simply follow the case used in the source text. If this means having to duplicate certain strings that will be displayed using different case in different parts of the game, translating a string twice is preferable than having to deal with inappropriate capitalization during the LQA phase.

If it is too late to avoid the ToUpper conversion due to how far the game is into the LQA phase, here is a code snippet that can be used to properly convert these two problematic Turkish characters:


public string AutoCapitalize(string text, Language lang)

{

   // Check for Empty String

    if (string.IsNullOrEmpty(text))

        return "";


    // Single letter string

    if (text.Length == 1) {

        if(!lang.Name.Equals(Language.Turkish)) {

            return text[0].ToString().ToUpper();

        } else {

            return AutoCapitalizeTurkishLetter(text[0].ToString());

        }

      }


    // Multiple letters string

    if(!lang.Name.Equals(Language.Turkish)) {

        return text[0].ToString().ToUpper() + text.Substring(1);

    } else {

        return AutoCapitalizeTurkishLetter(text[0].ToString()) + text.Substring(1);

    }

}


private string AutoCapitalizeTurkishLetter(string letter) {

    switch (letter)

    {

        case "i": return "İ";

        case "ı": return "I";

        default:    

            return letter.ToUpper();

    }

}

 

This should help you solve this Turkish capitalization issue. We hope you found this article helpful! And if you are a developer, remember to stay away from ToUpper()!

Read more about:

Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like