".localized" folders in MacOS
How does the mechanism of ".localized" folders in MacOS really works?
Where are the localisations stored?
Is it possible to create my own one?
How does the mechanism of ".localized" folders in MacOS really works?
Where are the localisations stored?
Is it possible to create my own one?
There are (at least) two layers to this, and the mechanisms are different depending on whether you're looking at standard System directories or user-created directories
For example, most of the standard directories (such as Desktop, Music, Pictures, etc.) have a sole .localized file. This acts as a flag to the Finder to show a localized name for this directory, based on the current user's settings. These use some kind of internal lookup, not (normally) accessible to the user.
For your own directories (and, to be clear, this is aimed at developers looking to localize their own application, not end users), you can create a .localized file along with a string list that maps to how the directory should be shown under different language settings.
More details can be found here: Localizing the Name of a Directory
There are (at least) two layers to this, and the mechanisms are different depending on whether you're looking at standard System directories or user-created directories
For example, most of the standard directories (such as Desktop, Music, Pictures, etc.) have a sole .localized file. This acts as a flag to the Finder to show a localized name for this directory, based on the current user's settings. These use some kind of internal lookup, not (normally) accessible to the user.
For your own directories (and, to be clear, this is aimed at developers looking to localize their own application, not end users), you can create a .localized file along with a string list that maps to how the directory should be shown under different language settings.
More details can be found here: Localizing the Name of a Directory
Thx a lot for this very helpful answer.
The Finder even shows the localized names w/o a restart or even a new log-in.
".localized" folders in MacOS