Author Topic: "file type" language  (Read 10103 times)

ncnnnn

  • Junior Member
  • **
  • Posts: 31
    • View Profile
"file type" language
« 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

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 540
  • Old Skull
    • View Profile
Re: "file type" language
« Reply #1 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+)

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4417
    • View Profile
    • Multi Commander
Re: "file type" language
« Reply #2 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.



Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 540
  • Old Skull
    • View Profile
Re: "file type" language
« Reply #3 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 (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)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4417
    • View Profile
    • Multi Commander
Re: "file type" language
« Reply #4 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 (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

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 540
  • Old Skull
    • View Profile
Re: "file type" language
« Reply #5 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.

ncnnnn

  • Junior Member
  • **
  • Posts: 31
    • View Profile
Re: "file type" language
« Reply #6 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.