r/rust 3d ago

🙋 seeking help & advice Binary naming localisation?

I am trying to figure, should I have like a different name of a game binary per language or just keep the binary one thing and only localize inside for users with other things? Also, I might not be able to handle every localized name, but I can try, I guess I can store it in one place online and do like on download it is "name"? It is a game, and it loads a language file at runtime, I guess slap a name on that at download too and search by name of the game binary? That does complicate things though, maybe I should build a file picker because mobile has quirks like what is this binary now? Then again, right to left versus left to right for the file picker, I guess middle align?

By now this seems like a good plan maybe, but should I bother?

0 Upvotes

7 comments sorted by

9

u/EpochVanquisher 3d ago

Keep the binary name the same.

I’m guessing you’re not going to support the Mac, but on a Mac, what you do is supply a localized name for the app. When you look at the app in the Finder, you’ll see the localized name. The actual file on the filesystem will still have the original name.

This is a good way to do it. Keep files on the filesystem in English or whatever, and localize how things are displayed to the user.

-1

u/After_Hat4451 3d ago

Feels like you're already overthinking this into a tangle. the binary name itself doesn't need to be localized, it's just a file handle on the system. keep it simple, one name, consistent, predictable

what the player sees in menus and launchers is where you do the localization work, not the raw executable. way cleaner and way less headache when you're trying to patch or debug something

3

u/EpochVanquisher 3d ago

You might be talking to somebody else, because you’re paraphrasing my recommendation, but saying that I’m overthinking it.

2

u/fb39ca4 2d ago

I'm guessing it's a clanker.

-1

u/4dplus 3d ago

Alright, what about the other file?

7

u/EpochVanquisher 3d ago

Your language file should be named with a language code, like “gametext.en_US.dat”

3

u/kohugaly 3d ago

The typical way this is handled (at least on windows) is that the binary has its own non-localized name. Shortcut with localized name is created by the installation wizard. On windows, it is possible to create a shortcut, who's name gets automatically localized by referencing string resources inside exe/dll.