2

I have a localized version of Windows 7. I can't figure out where windows gets the names for files and directories on the system. For instance, consider the following (default) files.

> cd C:\Users\Public\Pictures\Sample Pictures
> dir

Chrysanthemum.jpg
Desert.jpg
...

When I view these files on the default file explorer I see these names:

Crisantemo.jpg
Deserto.jpg
...

This seems to imply that each file can be somehow assigned a localized name somewhere.

However I cannot figure out how.

Would appreciate if someone could shed some light on this issue.

Thanks.

UPDATE EDIT:

The desktop.ini file in the folder containing Chrysanthemum.jpg contains the following entries. The .dll files used to translate the various resources are unfortunately not human-readable and I have no clue as to how they could be generated for other files created by the user to be translated, but they serve the purpose, and solve the mystery which lead to the post. Thanks.

[LocalizedFileNames]
Chrysanthemum.jpg=@%systemroot%\system32\SampleRes.dll,-101
Desert.jpg=@%systemroot%\system32\SampleRes.dll,-102
Hydrangeas.jpg=@%systemroot%\system32\SampleRes.dll,-103
Jellyfish.jpg=@%systemroot%\system32\SampleRes.dll,-104
Koala.jpg=@%systemroot%\system32\SampleRes.dll,-105
Tulips.jpg=@%systemroot%\system32\SampleRes.dll,-106
Lighthouse.jpg=@%systemroot%\system32\SampleRes.dll,-107
Penguins.jpg=@%systemroot%\system32\SampleRes.dll,-108

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21805
3
  • My question is, those files are displayed in English when I list them via a command prompt. What is the mechanism which allows file explorer to display localized names for them instead. I mean, the localized names must be stored somewhere else outside the file. Where??? Oct 25, 2013 at 20:07
  • You'd be surprised. I can enter either "crisantemo" or "chrysanthemum" in the search box just above the start menu button on windows 7. Both searches bring up exactly the same file which is displayed in the search result as Crisantemo.jpg (but there is no Chrysanthemum.jpg in the search results). The opposite happens when I issuse a dir command in that directory with a DOS prompt. Surprises me as well. Oct 26, 2013 at 14:59
  • You should keep your conclusions to answers, so your question poses a question, and your answer responds to your question. This allows people to upvote your research. I don't believe the dll in question can translate user generated files, you sure that happening, the sample files you list are not user generated.
    – Ramhound
    Oct 27, 2013 at 1:23

1 Answer 1

2

Check the desktop.ini file in that folder. It has a section titled [LocalizedFileNames] and under that section it has entries that link a filename with the resource string that should be displayed (or possible a hard-coded test).

The command promp will show you the actual filenames while explorer will show you the names after applying the (in)appropriate text replacements.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.