Page 1 of 1

i18n: substitution

PostPosted: Fri Jun 23, 2006 1:29 am
by tkilshaw
Seems that there are situations where an expresiion such as:

Code: Select all
myMethod( 'i18n:CAT.Label.Question' );


will produce the same result as

Code: Select all
myMethod( i18n.getI18NMessage( 'CAT.Label.Question'  ) );


There appears to be an implicit parsing of strings such that any string that begins with 'i18n:' actually gets replaced with it localised value.

This is not mentioned in the documentation, as far as I can see. There is one implicit usage of it in the user manual, around page 437 in my copy.

Code: Select all
var submenu = new Array(
plugins.popupmenu.createCheckboxMenuItem('i18n:bla_bla',my
Method),...);


And I came across it in the Forums in connection with its use in value lists.

When is it legal to use this format? And at what point does the locale substitution happen?

thanks,

Terry