As I continue on my Journey in creating my first game on steam I quickly learned how important it is to localize the game by adding different languages. I decided to start with Spanish because I felt that I could handle this one mostly on my own by using google translate and then I will have someone who speaks Spanish review once I am done.
I created a very simple csv file with two columns, one column for the key and one column for the word value.
SPANISH:
name,nombre
score,puntaje
lines,pauta
level,nivel
combo,combinación
english,inglés
spanish,español
ENGLISH:
name,name
score,score
lines,lines
level,level
combo,combo
english,english
spanish,spanish
I'm using a simple method to load the data based on the language selection 'en' or 'es'
I created a gitWord() method that handles the actual work of pulling the correct word based on the language setting.
The first parameter is the key for the word, the second is a padding value, the 3rd whether the word should be left or right justified and the 4th a capitalization style.
You can capitalize the first word in the string, all words in the string or none.
I've completed all the work for the Spanish language and the language option is available in the options menu. I'm currently working on deploying this release.
Next I will add some functionality to use the Steam SDK to detect the users language based on their Steam preferences and automatically selected the users language. I will also work on Simplified Chinese because a large portion of steam users are on Simplified Chinese.
No comments:
Post a Comment