Anyone knows how to translate wdx4i plugin please?

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
xmeron
Junior Member
Junior Member
Posts: 90
Joined: 2009-06-17, 19:43 UTC

Anyone knows how to translate wdx4i plugin please?

Post by *xmeron »

Here is the plugin's web link:
http://totalcmd.net/plugring/wdx4i.html
There is only one paragraph in package to describe how to translate:
To translate or change default fuild names of plugin add (edit) section for your language in a text file wdx4i.lng in same dir as plugin is. For example see section [RUS].
But, tried many ways, still no any effect, even you translated it over, you still don't know how to set language to that translated one. And, there is no thread for this plugin, either.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50421
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I didn't try this specific plugin, but normally you include a section like this:
[xyz]
english1=translated1
english2=translated2
etc.

with xyz the same code as used in the language file. For example, for French wcmd_fra.lng, the section would be [fra].
Author of Total Commander
https://www.ghisler.com
User avatar
deus-ex
Power Member
Power Member
Posts: 979
Joined: 2003-02-10, 17:45 UTC

Post by *deus-ex »

Hi xmeron,

I read your post and decided to download the plugin to have a look for myself, and I was able to figure it out:

The default interface language of the wdx4i plugin is English, just like Total Commander. If you have configured Total Commander to use another than the default interface language, the wincmd.ini entry Languageini in the [Configuration] section will reflect that with an appropriate string.

For example for the Russian translation the Languageini string will read wcmd_rus.lng. The wdx4i plugin reads out the three language indicating characters of that string, i.e. "rus" and checks whether a matching translation section "[RUS]" is available in the file wdx4i.lng. If a matching translation is found it is activated automatically, otherwise the plugin defaults to the built-in English translation. The file wdx4i.lng (found in the plugin distribution archive) must be copied into the wdx4i plugin folder.

I hope my explanation makes sense to you.
User avatar
xmeron
Junior Member
Junior Member
Posts: 90
Joined: 2009-06-17, 19:43 UTC

Post by *xmeron »

ghisler(Author) wrote:with xyz the same code as used in the language file. For example, for French wcmd_fra.lng, the section would be [fra].
After read your post, I suddenly understand an interesting thing, that is this problem's reason one:
TC uses a different country/language abbreviation which is not same with many other softwares, I just wrote my translation into language file in this general/common used country/language abbreviation, that caused plugin cannot recognize this translated section.
But, both abbreviation names seem OK, one name is almost just like another name's alias.
deus-ex wrote:the wincmd.ini entry Languageini in the [Configuration] section will reflect that with an appropriate string.
deus-ex wrote:otherwise the plugin defaults to the built-in English translation.
Thanks for your explanation. Yes, wdx4i has no independent language settings, it will read the language settings from TC's language setting, so the reason two is:
Because I am using English TC interface, wdx4i will follow this TC setting even you have many other correct translation in wdx4i's language file. The only choice is you have to change your TC language.

:arrow: :arrow: :arrow:
For more, I'd like to feedback two bugs of wdx4i.

The bug one is, for some special animated gif files, wdx4i cannot read out the picture data, such as Dimension. But Shelldetails and Imgsize plugins can read correctly. Below is one of these special sample pictures, you can download(open the link, right click on picture, then save as) and place into TC to have a test:
The bug two is, a weird error window appears some times(OS environment: Win 10 64bit, TC 8.51a), below is the screenshot:

Hope the author can see this post.
User avatar
deus-ex
Power Member
Power Member
Posts: 979
Joined: 2003-02-10, 17:45 UTC

Post by *deus-ex »

xmeron wrote:The only choice is you have to change your TC language.
There is one more option, or say work around available. It is the way I figured out the translation functionality of the plugin. For example to activate the Russian translation of the plugin while using Total Commander's English interface language at the same time, simply replace the header [RUS] of the Russian translation in the file wdx4i.lng with the string [ENG].

EDIT:
The plugin seems to ONLY check for an available translation when TC's language is NOT set to English. For example I'am able to activate the Russian translation of the plugin, when TC's interface language is set to German and exchanging the string "[RUS]" with "[DEU]" in the file wdx4i.lng.
/EDIT
xmeron wrote:The bug one is, for some special animated gif files, wdx4i cannot read out the picture data, such as Dimension. But Shelldetails and Imgsize plugins can read correctly.
Confirmed, I get that, too.
User avatar
xmeron
Junior Member
Junior Member
Posts: 90
Joined: 2009-06-17, 19:43 UTC

Post by *xmeron »

deus-ex wrote:simply replace the header [RUS] of the Russian translation in the file wdx4i.lng with the string [ENG].
That is a very smart solution if you are using a non-English interface TC. But if you are using an English TC, you will meet the same situation in Reason Two mentioned above.
deus-ex wrote:The plugin seems to ONLY check for an available translation when TC's language is NOT set to English
Yes, If TC is in English, wdx4i.wdx will use the English string stores in plugin file itself, so this time, even you delete wdx4i.lng, it still can show English wdx4i interface, but no more chance to show other languages in wdx4i.lng file.
User avatar
deus-ex
Power Member
Power Member
Posts: 979
Joined: 2003-02-10, 17:45 UTC

Post by *deus-ex »

xmeron wrote: That is a very smart solution if you are using a non-English interface TC. But if you are using an English TC, you will meet the same situation in Reason Two mentioned above.
Yes, I already pointed that out in my EDIT.
xmeron wrote:Yes, If TC is in English, wdx4i.wdx will use the English string stores in plugin file itself, so this time, even you delete wdx4i.lng, it still can show English wdx4i interface, but no more chance to show other languages in wdx4i.lng file.
Well, that is obvious as there is no English translation section available in the file wdx4i.lng. I was hoping the user could for example add their own English translation, overwriting the built-in strings. Unfortunately the plugin author developed a different, quite limiting solution.
Post Reply