Devlog #032: Start menu with localization
Now that I started on the start menu, I automatically started thinking about implementing localization.
I have now built a localization class that holds all translations for specific texts.
To test this I have implemented a language change and scene update whenever the "Options" button is pressed. As you can see it works just fine!
I'm very happy with this result and have learned a lot in the process.
For example I didn't know I could NOT store CJK characters inside a simple string. The characters needed for these type of words needed to be bigger, so I should either use wchar arrays or a wstring.
Luckily SFML supports entering wstrings directly into a Text, after which it will automatically render the CJK font characters as intended.
Because I use separate fonts for EFIGS and CJK, I have programmed a function that will change the used font when changing to a different language. It also changes the character sizes, because the CJK characters size 30 is much smaller than the EFIGS characters in size 30.
A great start for further localization!
Because my game will not have much text, I hope to be able to localize most text using the Polyglot game translation table. In the end I probably only have to pay for localization of my game page and achievements.
Next step is adding a credits button and making the options menu!
Get Rocket Shipment
Rocket Shipment
A tricky physics based rocketship delivery game with an integrated level editor
Status | In development |
Author | ChocolatePinecone |
Genre | Puzzle |
Tags | 2D, Flight, Level Editor, Minimalist, Physics, Pixel Art, Puzzle-Platformer, Retro, Singleplayer, Space |
Languages | German, English, Spanish; Castilian, Spanish; Latin America, French, Italian, Japanese, Korean, Dutch, Polish, Russian, Turkish, Chinese (Simplified), Chinese (Traditional) |
Accessibility | Configurable controls, Interactive tutorial |
More posts
- CHANGELOG v0.12.1Sep 07, 2023
- CHANGELOG v0.11.1Oct 10, 2022
- CHANGELOG v0.11.0Apr 06, 2022
- CHANGELOG v0.10.0Jan 12, 2022
- CHANGELOG v0.9.1Nov 22, 2021
- CHANGELOG v0.9.0Aug 26, 2021
- Update v0.8.0: Introducing powerupsJun 22, 2021
- Update v0.7.0: Lowering difficultyMar 23, 2021
- Update v0.6.0: Improving player experienceFeb 26, 2021
- Update v0.5.0 featuring new conveyor tilesFeb 05, 2021
Leave a comment
Log in with itch.io to leave a comment.