#633 Dynamic Locale Change for msgcat with on-demand File Load

open
5
2012-09-06
2012-09-06
No

Feature request 3511941 / TIP#399 "Add msgcat dynamic languages ability" were not able to reload any registered message files.

Using this version, message files are loaded if required by a locale change:

% msgcat::mclocale en
en
% namespace eval p1 { msgcat::mcload msgs }
... will load message files en.msg and ROOT.msg from folder msgs
...
% msgcat::mclocale fr
...will load fr.msg from folder msgs and locale will be available

A package may inform itself about locale change:

% namespace eval p1 {msgcat::mcpackageconfig changecmd updateGUI}
% msgcat::mclocale de
...will load de.msg from folder msgs and locale will be available
...will invoke "::pi::updateGUI de {}"

The attached file is the first implementation. It contains tip404.
Also attached is a prepared tip for review.

Thank you all,
Harald

Discussion

  • Harald Oehlmann

    Harald Oehlmann - 2012-09-06

    msgcat.tcl 1.6.0 with file load on locale change

     
    Attachments
  • Harald Oehlmann

    Harald Oehlmann - 2012-09-06

    Prepared TIP 399BIS

     
    Attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks