Page 1 of 2
[Implemented] Command to load .lng files
Posted: 2013-11-25, 21:32 UTC
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.
Posted: 2013-11-26, 17:10 UTC
by ghisler(Author)
Unfortunately this would only be interesting for ~ 25 people (the translators). Why not just use a tool like TC restarter?
Posted: 2013-11-26, 17:24 UTC
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+emrk3EBGSG8lliEZSZ4yNqSZjY62O28CtB0SL
q7aaiSeOiRexQqG13WeS9H7N3f1artsWw7cvEhgyUz+UqymBEqNGQ1cVjMZV0fsWSrfLoSHnXixN
edPwfUh9yuJgs8xh4UaOGzKehnWFrtZVv+ncmM6c/0rikCfnIMNjDoycmkishbIHALEXGQ2iyax1
bRk7d9DtD3cBOQXm3dKC5qJCan7gcoppP7LpBm3eKp5wiz3N3zQ1xKTh3y4nl4S1xSULvG5sBYSu
RjeOkLlLDdOUs4+vshf8vPREcyWSuO6nYcGAoRMdnyulS1CbFgglxGxRHk5yD4VlevY9qGlK4GNE
YSZc+U+BSxjHWRdW0hNuQZLtaMIrnJfbGUNJ8bXNzri9AsMX8/CZpJN7UVs/+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2Rtas05fFtUlX5vpJadT9bTfBvl0hYyb
NvR8HRzb2t6Tlvxv+m5vjAjYmwABBAYAAQmE2gAHCwEAAiMDAQEFXQAAAQAEAwMBAwEADIgAiAAA
CAoB8yY5KwAABQERGQBTAGUAdABMAGEAbgBnAC4AZQB4AGUAAAAUCgEAAJELDXnbzQEVBgEAICgA
AAAA
It works with 32-bit TC only.
Posted: 2013-11-26, 22:51 UTC
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
Posted: 2013-11-27, 13:13 UTC
by Sir_SiLvA
why would you restart tc for language or menu switch when you can do it by options?
Posted: 2013-11-27, 13:40 UTC
by MVV
Restarting TC for switching language would be a pain.
My tool doesn't need a restart, it does it via configuration dialog.
Posted: 2013-11-28, 00:41 UTC
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.
Posted: 2013-11-29, 00:08 UTC
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
Posted: 2013-12-05, 21:17 UTC
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.
Posted: 2013-12-05, 21:27 UTC
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.
Posted: 2013-12-05, 22:54 UTC
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
Posted: 2013-12-24, 02:24 UTC
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
Posted: 2013-12-24, 10:13 UTC
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.
Posted: 2014-03-12, 18:13 UTC
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.
Posted: 2014-03-12, 22:18 UTC
by petermad
Thank you very much for this new command
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.