top of page
Search

Japanese Translation

  • Writer: Team Torii
    Team Torii
  • May 20, 2020
  • 1 min read

As Kisetsu takes place in a Japan, I wanted to put my background in Japanese language to work and translate Kisetsu’s menus. I decided to use JSON (Java Script Object Notation) to hold the translations because of its simple syntax and fast execution. There are two JSON files, one for English and one for Japanese. The data is separated into “keys” and “values.” The keys are the same for both languages, and the values contain the actual translated text. This allows me to use the keys in my code and have the values change automatically when the files are changed.


The JSON file containing “keys” and “values.”
Setting the text of each button to the value of the corresponding key

After setting up the storage of the translations, I had to go about changing the actual text in our game menus. Our menus consist several lists of buttons. The button objects in Unity contain text objects, so I was able to loop through all of the buttons in each menu and get the text of each one. Then I use the key that corresponds with the button to get the translated value from the selected language file, and set the text to that value. After all of that, it takes just the press of a button to change our menus from English to Japanese and back.

Author: Micah Weltzin

 
 
 

Comments


bottom of page