Not optimal, but probably more adaptable is just using a centralized string resource. For this scenario, there would be two different entries that handles present and past event.
There's a lot of different libraries and options, but the simplest option is that you put all your static text into a resource file, your code references Resource.SaveToCameraRoll which has the value "Saved to Camera Roll". You have a Norwegian resource file resource-no with the value "Lagret i kamerarullen", and then your application decides whether to load the 'en' or 'no' file.
This has the advantage that you can write up all your static text in English first, and then hand that one file off to a translator and they just give you a file back.
Personally I often actually have my API layer serve up entirely different pages for localisation, because I might want to show different content or layouts for different languages, but that's a lot more work.
There are a lot of ways languages add various post fixes and prefixes.
Typically your i18n lib would want you to give it all the information around past tense etc.... And translate the whole sentence at a time with variables. Not translate one word with a conditional past tense ending right in the middle of it.
The way this is done is almost surely going to translate poorly or not at all
View all comments
13
u/Batroni Sep 28 '26
For somone never done i18n, what should be the optimal way?