This is applicable to almost any piece of software with text in it. When starting your new app, you should make sure you are using a separate language file for the strings in your app. This makes text reusable, and you can change it all in one place.

Once your app gains a community, if you did this, you can also get translators!

With Photon i made the massive mistake of hardcoding everything up until the app became massive, and my PR for un-hardcoding all the strings looks like this:

The amount of lines modified in the GitHub PR. 2,067 lines added, 1,082 removed.

It was worth it though! Because the community has translated it into 11 languages!

  • @[email protected]
    link
    fedilink
    71 month ago

    I’m French, so when building any GUI stuff I just tend to start from the beginning with both French and English languages, that way I have a reason for doing this from the start. I’m thinking I should also add Spanish, so that I can keep my admetedly low skills in Spanish.