Maescool/Catacomb-Snatch — comment on commit c51aaac07fba7e3e6a9a138acc31f0a76d81f056
File:  line 0
By mkalam-alami:

> This class will be exactly this size no matter how many languages we add (it even has support for Swedish as we speak!).

Yeah but it will grow with each string we add. Once the project will have 100 different strings, the Texts class will be huge. Plus it's annoying to set up a specific method every time you want to add a single line of text to the game.

> It is of utmost importance to not format texts where they are used. Different languages use different grammar, some with verbs at the beginning and some with verbs at the end. Or if you want to add a currency, you should be able to have "10 gold" or "$10".

Indeed, that's why "printf"-like functions are powerful. Here it's not a problem, for instance:

MessageFormat.format(texts.getString("hasDied"), playerName(team));

will stay the same whatever language you choose (you can set the "hasDied" line to `{0} has died!` or `blah blah {0}`).

Here is an example from my mod:
https://github.com/mkalam-alami/inventory-tweaks/blob/master/src/InvTweaksLocalization.java
https://github.com/mkalam-alami/inventory-tweaks/blob/master/src/InvTweaksGuiSettings.java (l. 43 to 47 for instance)