You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by heikki <tr...@gmail.com> on 2011/08/06 01:35:43 UTC

i18n for html header elements

Hello,

I've used Wicket's i18n functionality to provide users of my site the choice
to view it in various languages, and this works well.

Except for things that go in the html header. My aim is that all html header
elements containg text, are localized too -- but it doesn't happen.

For example, putting this in my html page:

<html>
<header>
     <title>
          <wicket:message key="title.home">welcome to my
site</wicket:message>
     </title>
...

doesn't display the translated string -- just the <wicket:message...> itself
appears as the title of the page in the browser.

Doing exactly the same thing for strings in the html body of the same page
works perfect.


Is it possible to use the i18n mechanism for html header elements too? 

Thanks in advance for your answers,
kind regards
Heikki Doeleman




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/i18n-for-html-header-elements-tp3722490p3722490.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: i18n for html header elements

Posted by Martin Grigorov <mg...@apache.org>.
see IMarkupSettings.setStripWicketTags(true)

On Sat, Aug 6, 2011 at 7:13 PM, heikki <tr...@gmail.com> wrote:
> hi Dan,
>
> you're right ! The translation as such is working fine, it's just the
> preserved <wicket:message..> element that is also displayed in the page's
> title.
>
> Am I right that in non-development mode, the wicket elements are stripped
> from the page? In that case I can live with them while developing, now that
> it's clear that the translation as such is done correctly.
>
> thank you and kind regards
> Heikki Doeleman
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/i18n-for-html-header-elements-tp3722490p3723536.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: i18n for html header elements

Posted by heikki <tr...@gmail.com>.
hi Dan,

you're right ! The translation as such is working fine, it's just the
preserved <wicket:message..> element that is also displayed in the page's
title.

Am I right that in non-development mode, the wicket elements are stripped
from the page? In that case I can live with them while developing, now that
it's clear that the translation as such is done correctly.

thank you and kind regards
Heikki Doeleman


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/i18n-for-html-header-elements-tp3722490p3723536.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: i18n for html header elements

Posted by Dan Retzlaff <dr...@gmail.com>.
s/goes/goes away/  :)

On Sat, Aug 6, 2011 at 8:48 AM, Dan Retzlaff <dr...@gmail.com> wrote:

> If I recall correctly, the string literal "<wicket:message>" goes
> deployment mode. We haven't internationalized our site yet, so I can't speak
> to any potential bug with locale-specific resource lookups. You might try
>
> <title wicket:id="title">...</title>
>
> with a corresponding Label and ResourceModel. We did that just to get rid
> of the <wicket:message> in development mode.
>
>
> On Sat, Aug 6, 2011 at 3:19 AM, heikki <tr...@gmail.com> wrote:
>
>> hi Martin,
>>
>> thanks for your suggestion, but it made no difference. I tried
>>
>> <html xmlns:wicket="http://wicket.apache.org/">
>> <wicket:head>
>>    <title><wicket:message key="title.gallery">Bienvenue à
>> Braziland</wicket:message>
>> </title>
>> </wicket:head>
>> <body>
>>
>> and it's the same, no translated title shown, but instead the
>> <wicket:message...> appears as the title.
>>
>>
>> What am I doing wrong here? Surely it must be possible to use i18n for
>> header elements ?
>>
>>
>> Kind regards,
>> Heikki Doeleman
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/i18n-for-html-header-elements-tp3722490p3723142.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

Re: i18n for html header elements

Posted by Dan Retzlaff <dr...@gmail.com>.
If I recall correctly, the string literal "<wicket:message>" goes deployment
mode. We haven't internationalized our site yet, so I can't speak to any
potential bug with locale-specific resource lookups. You might try

<title wicket:id="title">...</title>

with a corresponding Label and ResourceModel. We did that just to get rid of
the <wicket:message> in development mode.

On Sat, Aug 6, 2011 at 3:19 AM, heikki <tr...@gmail.com> wrote:

> hi Martin,
>
> thanks for your suggestion, but it made no difference. I tried
>
> <html xmlns:wicket="http://wicket.apache.org/">
> <wicket:head>
>    <title><wicket:message key="title.gallery">Bienvenue à
> Braziland</wicket:message>
> </title>
> </wicket:head>
> <body>
>
> and it's the same, no translated title shown, but instead the
> <wicket:message...> appears as the title.
>
>
> What am I doing wrong here? Surely it must be possible to use i18n for
> header elements ?
>
>
> Kind regards,
> Heikki Doeleman
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/i18n-for-html-header-elements-tp3722490p3723142.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: i18n for html header elements

Posted by heikki <tr...@gmail.com>.
hi Martin,

thanks for your suggestion, but it made no difference. I tried

<html xmlns:wicket="http://wicket.apache.org/">
<wicket:head>
    <title><wicket:message key="title.gallery">Bienvenue à
Braziland</wicket:message>
</title>
</wicket:head>
<body>

and it's the same, no translated title shown, but instead the
<wicket:message...> appears as the title.


What am I doing wrong here? Surely it must be possible to use i18n for
header elements ?


Kind regards,
Heikki Doeleman

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/i18n-for-html-header-elements-tp3722490p3723142.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: i18n for html header elements

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi!

I am not sure, but you might need to use <wicket:head> tag.. (1.4 thouhg)

**
Martin

2011/8/6 heikki <tr...@gmail.com>:
> Hello,
>
> I've used Wicket's i18n functionality to provide users of my site the choice
> to view it in various languages, and this works well.
>
> Except for things that go in the html header. My aim is that all html header
> elements containg text, are localized too -- but it doesn't happen.
>
> For example, putting this in my html page:
>
> <html>
> <header>
>     <title>
>          <wicket:message key="title.home">welcome to my
> site</wicket:message>
>     </title>
> ...
>
> doesn't display the translated string -- just the <wicket:message...> itself
> appears as the title of the page in the browser.
>
> Doing exactly the same thing for strings in the html body of the same page
> works perfect.
>
>
> Is it possible to use the i18n mechanism for html header elements too?
>
> Thanks in advance for your answers,
> kind regards
> Heikki Doeleman
>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/i18n-for-html-header-elements-tp3722490p3722490.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org