Hacker News new | ask | show | jobs
by codingdave 33 days ago
The only thing we're talking about here is the difference between <p>Hard-coded string</p> and <p>${strings.notHardCoded}</p>

That is really just some file organization and some code syntax, not a major architectural difference. And it gets you a long way towards going multi-lingual when you need it, without much effort at all.

1 comments

You have to create keys, copy the text into a file, and when editing the text, you need to update that file instead of the code. When removing the interface, don’t forget to delete the keys from the file. When moving the interface, you need to reorder the keys in the file. When changing the meaning of the text, you need to change the key name. The benefit of these actions is almost zero if the startup has no users.