2005/11/9, Andrew Berman <[EMAIL PROTECTED]>:
Oh and the other nice feature would be that if you do it like this: <wicket:message key="..">My Text</wicket> that the My Text would be the default text if the key is not found.
 
How about using the content as the key <wicket:message>keyLabel</wicket:message>?
 
And for _javascript_, I think it could be possible to create a component that creates a _javascript_ object for the page resource (selected locale). Like this:
 
PageX_en.properties
keylabel1=Hello world!
keylabel2=You are using en-locale
 
PageX.html
....
<span wicket:id="i18n_component"/>
...
<script>
function myFunc() {
  alert(i18n.keylabel1);
  alert(i18n.keylabel2);
}
</script>
 
generated html:
....
<script>
i18n = {
keylabel1='Hello world!',
keylabel2='You are using en-locale'
};
</script>
....
<script>
function myFunc() {
  alert(i18n.keylabel1);
  alert(i18n.keylabel2);
}
</script>

Reply via email to