Some issues on .lng files

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Some issues on .lng files

Post by *pdavit »

I just wanted to ask you if you know how TC treats .lng files. Is the default file's functionality (wcmd_eng.lng) build-in in TC? Does TC check for the presence of this file somewhere in order for someone to provide a modified version and overwrite the current configuration? Is there a specific naming scheme that should be followed for those files? Can we have Christian (or whoever knows) a brief explanation on those issues and more that I cannot think of?

Thank you all in advance!
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Re: Some issues on .lng files

Post by *Sheepdog »

pdavit wrote:I just wanted to ask you if you know how TC treats .lng files. Is the default file's functionality (wcmd_eng.lng) build-in in TC?
Yes it is. So if you delete the whole '\Language' folder you have still the english version of TC present including the english menu-file.
Does TC check for the presence of this file somewhere in order for someone to provide a modified version and overwrite the current configuration?

Yes. If you want to change the laguage with 'Configuration->Otions->Language' TC looks for the %Commander_path%\Language\*.lng files that are present. These files are displayed and only these files you can use. The fist line of these files is displayed at first and after that the filename e.g.

Code: Select all

 English
English (Wcmd_eng.lng)
STefan (Wcmd_deu_Stefan.lng)
The first 'English entry represents the inbuilt language file (so there is no filename)
Is there a specific naming scheme that should be followed for those files?
Yes there is. After you know that these Language files must have the extension *.lng to be recognised by TC it's useful to know that TC assumes you want to use the menu file with the same name as the language file.
So if you have an My_very_personal.lng and select it in the config dialog, TC will look for a My_very_personal.mnu and propose it as the menu to use. Of course you can choose any ohter Menu, but by creating a language-file that coresponds to the name of your menu the changing of menus is very easy to deal with one click.
Ohterwise youll have to select the language first and then select the menu file.

Hope this is as much informative as you need it.

sheepdog

I downloaded the english version of the language file to provide some different english menus too by clicking only once. I replicated this one with different names following the above mentioned guide.
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

Thanks for all the help!

> If you want to change the laguage with 'Configuration->Otions->Language' TC looks for the %Commander_path%\Language\*.lng files that are present.

Ok, but apparently the relationship between .lng and .mnu, is there up to a certain point? I mean I can have for example Greek menus while the interface is English since a MENUITEM command holds just some text. Am I wrong here?

Oh, by the way, I've noticed that of you delete the .inc file from the TC dir and you use a custom menu file when you reload TC the default menus are loaded. Copying the file back into the TC directory and reloading TC it loads back the custom menus automatically!
Last edited by pdavit on 2004-10-08, 22:41 UTC, edited 1 time in total.
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

I mean I can have for example Greek menus while the interface is English since a MENUITEM command holds just some text. Am I wrong here?
You are right here.

Concerning the filenames, they must begin with wcmd_*. My_very_personal.lng wouldn't work, as Sheepdog certainly tested... ;) :P

HTH
Roman
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

pdavit wrote:Ok, but I apparently the relationship between .lng and .mnu, is there up to a certain point? I mean I can have for example Greek menus while the interface is English since a MENUITEM command holds just some text. Am I wrong here?
You are right. As I mentioned: If you choose e.g. My_english_menu.lng ther is in the 'Main Menu file'-Listbox a My_english_menu.mnu proposed.
If this is not available TC would use instead (and without further int) the inbuilt Menu.
Or you could select another menu located somewhere in your PC (or even the net) in any language.
But if you change the language (as I do frequently to get the english terms of TC instead of the german) and want to switch back you'll have to choose your menu manually (until you adopt the name to the appropriate language file and place it to the 'language' folder).

Oh, by the way, I've noticed that of you delete the .inc file from the TC dir and you use a custom menu file when you reload TC the default menus are loaded. Copying the file back into the TC directory and reloading TC it loads back the custom menus automatically!
You are right again. So TC also uses an inbuilt 'totalcmd.inc' to refer to the internal commands. I did not notice it until you mentioned it. So we know just a bit more about how TC works. ;)

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

A trick...

Post by *Clo »

2Sheepdog
:) Hello Stefan !
But if you change the language (as I do frequently to get the english terms of TC instead of the german)…
- I have also to find the right English terms, but I don't change the language : I watch the screen of the other workstation just beside, where I keep a TC in English :P
So we know just a bit more about how TC works. ;)
- Who does know all TC-mysteries ? :roll:

:mrgreen: V G
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Re: A trick...

Post by *Sheepdog »

Clo wrote:Hello Claude
- I have also to find the right English terms, but I don't change the language : I watch the screen of the other workstation just beside, where I keep a TC in English :P
I just tried this trick, but unfortunately it does not work for me :( .

As often as I look beside there is still no second workstation :lol: :P :mrgreen:

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

Sheepdog wrote:So TC also uses an inbuilt 'totalcmd.inc' to refer to the internal commands. I did not notice it until you mentioned it. So we know just a bit more about how TC works.
Yes, and I guess in the same way we can intervene to default configurations with the use of a custom .lng file we can also intervene with configuring user menu internal commands and overwrite the internal (build-in) .inc commands. 8)
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

pdavit wrote:
Sheepdog wrote:So TC also uses an inbuilt 'totalcmd.inc' to refer to the internal commands. I did not notice it until you mentioned it. So we know just a bit more about how TC works.
Yes, and I guess in the same way we can intervene to default configurations with the use of a custom .lng file we can also intervene with configuring user menu internal commands and overwrite the internal (build-in) .inc commands. 8)
That's right. But they have to begin with 'cm_' to make them work with buttons. If only used in the Menu you could use 'de_' or 'greek_' or 'english' as well ;)
Hacker wrote:Concerning the filenames, they must begin with wcmd_*. My_very_personal.lng wouldn't work, as Sheepdog certainly tested...
I did not know it, but I have tested it now and must confirm :lol: .


sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Post Reply