Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2015-10-21
16:38 • Closed ticket [3565279fff]: Dynamic Locale Change for msgcat with on-demand File... artifact: 299d19f11d user: oehhar
16:35 • Closed ticket [3511941fff]: Add msgcat dynamic languages ability plus 9 othe... artifact: 57a5916f3e user: oehhar
2012-09-06
20:24 • Ticket [3565279fff] Dynamic Locale Change for msgcat with on-demand File Load</i... artifact: 0af635b889 user: oehhar
20:24 • Add attachment 399BIS_tip.txt to ticket [3565279fff] artifact: 859c15c408 user: oehhar
20:22 • Ticket [3565279fff] Dynamic Locale Change for msgcat with on-demand File Load</i... artifact: 2b265ee4b6 user: oehhar
20:22 • Add attachment msgcat.tcl to ticket [3565279fff] artifact: ba951bad14 user: oehhar
13:22 • New ticket [3565279fff] Dynamic Locale Change for msgcat with on-demand File Loa... artifact: 3e0da3c4c6 user: oehhar

Dynamic Locale Change for msgcat with on-demand File Load

Closed / Accepted3565279fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 11 years ago
Descriptionplain2012-09-06 13:22:49
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
oehharplain2012-09-06 20:22:50
File Added - 452684: msgcat.tcl
oehharplain2012-09-06 20:24:06
File Added - 452685: 399BIS_tip.txt
oehharwiki2015-10-21 16:38:13

Accepted as TIP 412. Implemented in branch [msgcat_dyn_locale] and merged to trunk with [392ff6199d].

Log in (anonymous is fine) to add a comment.

Attachments: