views:

588

answers:

3

I'm trying to find out the 'correct' windows API for finding out the localized name of 'special' folders, specifically the Recycle Bin. I want to be able to prompt the user with a suitably localized dialog box asking them if they want to send files to the recycle bin or delete them directly.

I've found lots on the internet (and on Stackoverflow) about how to do the actual deletion, and it seems simple enough, I just really want to be able to have the text localized.

+2  A: 
Espo
The code project code demonstrates wonderfully how to get this information. I needed to use StrRetToStr(...) to get the returned value in a form that JNI could use in Java, but that was easy enough.
Free Wildebeest
A: 

Unfortunately the mentioned code project does not demonstrate how to get the desired information.

Yes, it returns the location of the Special Folders, but it does not tell anything about getting the LOCALIZED (=non-English) Special Folder names which was the question about.

For those who deal with the English version of Windows only:

From Vista onwards the special folders in the file system are named in English in all(?) language versions of Windows. (Personally I can tell it for the German version.)

In Start menu-->All programs and in Windows Explorer localized names are shown. E.g. Games is displayed as Spiele, Startup is displayed as Autostart, etc. in the German version.

Geri
And neither does your answer...
Philip Wallace
Absolutely right, maybe because I didn't find an answer yet...
Geri
So don't post...
Philip Wallace
And you still don't provide an answer to the question anyway!
Philip Wallace
A: 

WTF?!? You are censoring here? What about your own FAQ: „Be nice. Treat others with the same respect you'd want them to treat you. ff.

So, another try:

Xaero, I do not see any reason to be impolite, do you? And, in case you didn't know: knowing what does not solve your problem can save you a lot of time and effort. E.g. Knowing that a fork does not aid you in eating your soup saves you from ending up hungry with a dish full of cold soup. You understand?

Geri