Multi Commander Support Forum

Multi Commander => Support and Feedback => Topic started by: ncnnnn on June 24, 2024, 05:01:25

Title: "file type" language
Post by: 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
Title: Re: "file type" language
Post by: Jungle on June 24, 2024, 08:42:09
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+)
Title: Re: "file type" language
Post by: Mathias (Author) on June 24, 2024, 09:04:13
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.


Title: Re: "file type" language
Post by: Jungle on June 24, 2024, 11:20:52
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 (https://forum.multicommander.com/forum/index.php/topic,4797.msg13860.html#msg13860) (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.
Title: Re: "file type" language
Post by: Mathias (Author) on June 24, 2024, 11:36:05
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 (https://forum.multicommander.com/forum/index.php/topic,4797.msg13860.html#msg13860) (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.

Code: [Select]
 
  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
Title: Re: "file type" language
Post by: Jungle on June 24, 2024, 13:11:06
So now we know that MC shows File Type in correct language at least for RUS and ENG.
Title: Re: "file type" language
Post by: ncnnnn on June 25, 2024, 04:02:15
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.