How do folder name localizations work

directorydirectory-structureguilocaleosx

In Mac OS X, there are directories like Desktop, Users and Library.

On localized systems, these would be named Skrivbord, Användare and Bibliotek (Swedish)

But when I am in the terminal I can't type, for example: sudo mv ~/Skrivbord ~/Bibliotek, but instead I have to type their actual names like this: sudo mv ~/Desktop ~/Library.

How can its name in the GUI be in whatever language but in the Terminal it's in English?

Best Answer

Since Finder is built in objective-c it uses nib localizations. Here is an example.

/System/Library/CoreServices/Finder.app/Contents/Resources/sv.lproj/ServicesMenu.strings

sv.lproj stands for Svenska.localized project

Here is the contents of ServicesMenu.strings

bplist00”[Finder/Open]Finder/Reveal_Finder/Show InfolFinder/÷ppna_Finder/Visa i Finder_Finder/Visa info i Finder)<Ulà
Related Question