Get system language locale?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Party member
- Posts: 563
- Joined: Wed Oct 05, 2016 11:53 am
Re: Get system language locale?
A decent alternative is also to just ask users their preferred language when they launch your project, at least the first time. That leaves less room for ambiguity. Of course, this assumes you have localizations available for a given set of languages.
Re: Get system language locale?
As I replied somewhere to Brot:MrFariator wrote: ↑Sun Aug 20, 2023 2:08 pm A decent alternative is also to just ask users their preferred language when they launch your project, at least the first time. That leaves less room for ambiguity. Of course, this assumes you have localizations available for a given set of languages.
Even if I would ask user to pick language, I still want game to highlight language option that matches OS language if game supports it.
For example, my game has: Ukrainian, English, Russian, Polish, Belarusian. User opened game for first time, so there is no language option yet (or game simple might don't have saving features). I show to them menu with 5 buttons, where you could pick 1 of 5 languages that currently supported. It so happens, that user uses Linux distro and they choose Polish translation for that system, and my game supports it. And because of that I want game to "hey, I think your game is in Polish, language that I supports, so I highlighted this option for you!". Now button is highlighted and user can simply press "Enter" or whatever button on whatever device and user will continue with that language.
If user don't want Polish language then they just use arrows/mouse/etc to pick different one. And if user uses language for OS that is not supported by game or some error happened, then pick default one, which usually is English.
It's small feature, for sure, but I like when games do that, so why not?
ALSO: there another use-case for games that supports big amount of languages. For example, game named "Shuttered Pixel Dungeon". This game has quite big community, and translation for it hosted on transifex, so anyone can easily start helping with translation. And as result, game has around ~15 languages. And in options menu, in language tab, game will place button with language of your system on first place. So, if your system in English, it will place: English, and next language. If system in Russian, then English, Russian, other languages. If Ukrainian, then English, Ukrainian, etc, you get the idea.
Who is online
Users browsing this forum: Amazon [Bot] and 4 guests