[Implemented] Command to load .lng files

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

User avatar
petermad
Power Member
Power Member
Posts: 16021
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

[Implemented] Command to load .lng files

Post by *petermad »

I have requested this several times in the old beta-test forum, but never here in the main forum.

I would like to see a command to load .lng files like:

LOADLANGUAGE <filename>

If no path is given with the filename, TC should look for the .lng file in the Language directory.

If a corresponding .mnu file with the same name as the .lng file exists, then that .mnu file should also be loaded.

Alternatively a LOADMENU command could also be provided.

This should be a pretty easy feature to implement, since the functionality is already there.
Last edited by petermad on 2021-05-29, 20:09 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately this would only be interesting for ~ 25 people (the translators). Why not just use a tool like TC restarter?
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I'm not an official translator but I use custom versions of menu and language files, and I often need to switch to official ones in order to describe anything on forums. I use tiny tool for such task:

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="SetLang.7z"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="SetLang.7z"

N3q8ryccAAM1yldm2gQAAAAAAABhAAAAAAAAAD2241QAJpaOcAAX9+wFu+r0/5QBL0TuTr0JScWp
wXIs+2C8FAvofZL9OQyrmdRJ6fFEUwUox4AepJrWfamkx9MSo1AMPur1FMg8of0jfCyT3T8/4QjX
pnYFHMVJK5YgCvrdBPngkwbt4jRTNQtD2sunwg+emrk3EB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E8Ez+O27p9aNpxtB0K2YduAZF/EZ5v7E7p0py1
YnOHhUgJmMVR0W4X07vckE6J4TBACSq3tVXg2Eb3JjhNdzacO3ncEl4NrCe13d4KPEt+QFeNJXzJ
Fh+rTCo5LBZq/DQV8yQrogOM6a3Akt9Z9s7l5K9TZdJX3sy2oXg8SJvkjTEbtETdd3kh3Ty4bVOk
SEsMCjS3+LNobTgpURDho0qTdss6iEftgXu25cl0wvBmaS9Xa1hw2UpK+mx3A5IZleDDXkGSi5x7
s7d8rBhCuv+d31g10Yp3cFydsLXwbc6yBfC5Uw3V1H16Uk0qkS1C7ZRVF/9t9njgU9R+jJY0ggty
3buBKjsFKKrH+Oig5Ig02tz9bPnkBZu3/k/bNQD9jgmJ2Rtas05fFtUlX5vpJadT9bTfBvl0hYyb
NvR8HRzb2t6Tlvxv+m5vjAjYmwABBAYAAQmE2gAHCwEAAiMDAQEFXQAAAQAEAwMBAwEADIgAiAAA
CAoB8yY5KwAABQERGQBTAGUAdABMAGEAbgBnAC4AZQB4AGUAAAAUCgEAAJELDXnbzQEVBgEAICgA
AAAA

It works with 32-bit TC only.
User avatar
petermad
Power Member
Power Member
Posts: 16021
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

It could also be of interest for people using alternative menus - and according to downloads they count in thousands - see for example http://www.totalcmd.net/plugring/Extended_German_Menu.html
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

why would you restart tc for language or menu switch when you can do it by options?
Hoecker sie sind raus!
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Restarting TC for switching language would be a pain.

My tool doesn't need a restart, it does it via configuration dialog.
User avatar
petermad
Power Member
Power Member
Posts: 16021
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

why would you restart tc for language or menu switch when you can do it by options?
I dont want to restart TC - I want a command I can use in a button, in the menu or via an assigned key.

I an NOT asking for a command line parameter, but for an internal command like the current LOADSEARCH or OPENBAR.
Last edited by petermad on 2013-11-29, 08:14 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
HolgerK
Power Member
Power Member
Posts: 5409
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

an internal command like the current LOADSEARCH or OPENBAR
I would appreciate this too (also i'm not a translator).

Finding myself switching more than 5 times a week between English and German user interface...

Regards
Holger
Make our planet great again
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

I've requested a command for .mnu change - likely 10+ years ago when I worked a lot on customizing the drop-down main-menus.
As then as now, it's a complete pain in the nether-regions to change the .mnu files via the TC dialog's - something like 7 clicks

Open Change-Menu dialog, hit >>, manually-choose a file, enter/click, close the Change-Menu dialog -- well 5 or 6, might of missed a step.

Anything that reduces the amount of redundant actions to perform a task would be met with open arms.

I am not a translator, and I approve this message.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

ghisler(Author) wrote:Unfortunately this would only be interesting for ~ 25 people (the translators). Why not just use a tool like TC restarter?
Maybe it would be useful or of interest to the translators, but there are at least that many more who would find it of use --- and those people are the ones that come here regularly and give free support, answers, workarounds/scripts --- I would think, Mr.Ghisler, that it would be in your best interest and TC's to be more open-minded about the requests that come from those that work for you for free.
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3893
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Finding myself switching more than 5 times a week between English and German user interface...
Me too.=> support++

I use a shortcut (Shift-Ctrl-L) to open at least the option dialog with language preselected (half the way done)

Code: Select all

[Shortcuts]
CS+L=cm_LanguageConfig
#5767 Personal license
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Whenever I submit a bug report or a suggestion here, I must switch to English language when describing TC user interface - and then switch to my previous settings again.

So such a command would be very useful also for me.

Regards
User avatar
petermad
Power Member
Power Member
Posts: 16021
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

You can also have menus for different tasks - being able to thange the language/menu with one click would be useful, just as you now already can change the buttonbar for different tasks with one click.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have added this now, but I will not put it in the totalcmd.inc file because it's not interesting for the normal user. The command is:
OPENLANGUAGEFILE
or
OPENLANGUAGEFILE wcmd_xyz.lng

It will also set the mnu file with the same name. It can also be used to re-load a language file while editing it.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 16021
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Thank you very much for this new command :-D

May I suggest a little change. As it works now if I try to load for example wcmd_xyz.lng and that file is not present but the corresponding wcmd_xyz.mnu file is present, then TC loads English language and wcmd_xyz.mnu. I would prefer that it kept the current language - this way the command can be used to change menu's without changing language.

Same thing the other way around if I load wcmd_xyz.lng and the corresponding wcmd_xyz.mnu file doesn't exist, then TC uses the default English menu. I would prefer that the current menu was kept - this way the command can also be used to change language without changing the menu.

In other words if if the .lng file doesn't exist, then don't change language, but still change menu if the .mnu file exists.

And if the .mnu file doesn't exist, then don't change the menu.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply