K
K
KismaYT2021-09-10 17:41:00
Game development
KismaYT, 2021-09-10 17:41:00

How to create localization in the game?

I've made simple games in the past and decided to create a fairly large project and thought about localizing it. I can't find anything on the internet other than water. I need specifics:
What are the best file formats to use?
Whether correctly will create "Dictionaries"? If so, what is the best way to import them into the code?
How to localize textures, sounds?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Sokolov, 2021-09-10
@KismaYT

Create a proxy function that will return localizable values ​​from some base, and the base will already be implemented according to the needs of the project. And initialize the base with the language ID in the argument. First, we pull up the standard language, usually English. And then, if there is a locale, we pull it up and replace what is filled in there. As a result, this should be the only way to obtain such values. No hardcode, no direct links to resources, only locales. Also, you can take ready-made solutions if you need a more flexible setting (for example, changing substrings depending on some parameter: 1 cat, 2 cats, 10 cats)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question