Previous Entry Share Next Entry
06:35 pm, 30 Nov 04

translating file names

On a GNOME list they're discussing directory names. On a translated system, everything appears in your native language, until you open a file browser and discover your home directory is filled with directories named "Pictures", "Desktop", etc. What to do?
  1. Always create the directories with canonical, English names, and translate the names only when you display them in the GUI.

    Cons: GNOME apps will show one set of names for things, and Firefox, KDE apps, etc. will show another. Even GNOME apps that forget to canonicalize directory names will confuse users. Confuses terminal navigation because the names are wrong. What would typing in paths in a file chooser do--use the English path names or the translated ones?
  2. Or, when you create these directories the first time, translate the directory names depending on the user's language.

    Cons: screws up if the user switches languages. Screws up access via SSH if your terminal client doesn't support Unicode and your directory names are in Chinese. Screws up terminal navigation if the directory names are difficult to type. Screws up any program that doesn't understand Unicode filenames. Screws up any program's compile-time paths to files (though this could be addressed by an API that maps /home/luser/Desktop to /home/luser/Esktop-day).

Both sound pretty bad. For what it's worth OS X chose the former. Does anybody know what Windows did?

I remember discussing this with Brad for LJ's URL formats: we (I originally wrote he, but I didn't want to get it wrong and blame something on him; but I'm pretty sure it should be "he") wanted to not use English paths in user URLs, so (for example) the "archives" of the journal are just stored in date-numbered directories. Of course, you can't use Unicode in paths and there's still stuff like "friends", "?mode=reply", so you can't really win...