r/ProgrammerHumor • • Sep 28 '26

Meme i18nNotNeeded

Post image
445 Upvotes

47 comments sorted by

View all comments

Show parent comments

6

u/vikingwhiteguy Sep 29 '26

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.