News:

MultiCommander v16.6 is released!

Main Menu

"file type" language

Started by ncnnnn, June 24, 2024, 05:01:25

Previous topic - Next topic

ncnnnn

I am using a Chinese language pack, but when I added "file type", it did not display in Chinese.
I used language editing extensions and found that I couldn't find the relevant items and couldn't understand the sorting rules.
So I decompressed the language pack and searched for relevant text. I can't find it either.

Additionally, I found that columnset is stored in columnsetsXML. Directly stored name.
When switching languages, columns seem to not switch based on language changes

Jungle

I can only suppose that "File type" is simply read from registry as I did in my script. But in order to display localized string, so called FriendlyTypeName should be read either by LoadString or by RegLoadMUIStringW (the latter is only supported on Vista+)

Mathias (Author)

Quote from: ncnnnn on June 24, 2024, 05:01:25
I am using a Chinese language pack, but when I added "file type", it did not display in Chinese.
I used language editing extensions and found that I couldn't find the relevant items and couldn't understand the sorting rules.
So I decompressed the language pack and searched for relevant text. I can't find it either.

Additionally, I found that columnset is stored in columnsetsXML. Directly stored name.
When switching languages, columns seem to not switch based on language changes

1) File type names shown from the filetype columns is returned by Windows. MC ask windows for them. It should return same in Windows Explorer.

2) Yes some places do not support the multi language system. Like the "name" of default column sets.



Jungle

Quote from: Mathias (Author) on June 24, 2024, 09:04:13
1) File type names shown from the filetype columns is returned by Windows. MC ask windows for them. It should return same in Windows Explorer.

I don't know what does "is returned by Windows" mean. But I tried simple reading (Default) value for file extension from registry and then LoadString/RegLoadMUIStringW. Simple reading returns unclocalized string (I tested on RUS/ENG lang packs), while the latter return localized one.

Mathias (Author)

Quote from: Jungle on June 24, 2024, 11:20:52
Quote from: Mathias (Author) on June 24, 2024, 09:04:13
1) File type names shown from the filetype columns is returned by Windows. MC ask windows for them. It should return same in Windows Explorer.

I don't know what does "is returned by Windows" mean. But I tried simple reading (Default) value for file extension from registry and then LoadString/RegLoadMUIStringW. Simple reading returns unclocalized string (I tested on RUS/ENG lang packs), while the latter return localized one.

The "FileType Name" Column. (Added in 14.1)  MC asks Windows for the filetype

C/C++ API call to SHGetFileInfoW returns that.

 
  SHFILEINFOW fileInfo;
  UINT sizeFile = sizeof(fileInfo);
  UINT Flags = SHGFI_TYPENAME;
  if (!SHGetFileInfoW(szFilePath, 0, &fileInfo, sizeFile, Flags))
    return false;
 
  // FileType is set in
  fileInfo.szTypeName

Jungle

So now we know that MC shows File Type in correct language at least for RUS and ENG.

ncnnnn

Sorry for the description error. The content of "file type" is displayed correctly as explorer。

I just wonder if "file type" is not displayed as "类型".
And "ext" can be displayed as "扩展名".

Thank you very much for your answers.