We use a combination of the following for that sort of l10n/i18n. 1. <wicket:message> 2. A Label with a StringResourceModel, and setEscapeModelStrings(true) 3. Fragments
Scott On Fri, Feb 13, 2009 at 8:16 AM, Warren Bell <warrenbe...@gmail.com> wrote: > Create a panel with just the markup you need and switch them out with the > isvisible based on the current language needed? Similar to the post for "Re: > Adding/Replacing links in Panels" by Michael Sparer below. I use > WebMarkupContainer, but I only have two states. 14 may get a little messy > > Warren > > Mathias P.W Nilsson wrote: >> >> Hi, >> >> Just wondering how this should be handled without DRY. >> >> In many scenarios we have multiple languages that should have the same >> markup but different text. This could be handled by using variation and >> put >> every language in an own html file like myWicketPage_style_en.html. >> >> However, this is not the optimal way and I don't think variation is made >> for >> this either. It would be very annoing having 14 different html files if we >> have 14 different languages that we should support. >> Sometimes the languages should look different ( not the same look. >> Different >> positioning of elements ) and here we could use variation. As far as I'm >> concerned this is not the right way of handling look and feel. Different >> css >> should be used instead and then place position, coloring of the markup in >> a >> css. The html file should be the same and the css should handle the >> layout. Take a look at http://www.csszengarden.com/ >> http://www.csszengarden.com/ >> Every time I'm dealing with multiple languages the user wants bold, >> italic, >> color in the text. Many times a list will appear just containing text. ( >> Nothing to do with extracting data from database and let wicket handle it >> ) >> This could be added in a properties file but then we would have bold tags, >> italic and style tags in the properties file. If something should change >> we >> need to go thru 14 properties files to change the markup in the >> properties. >> >> Let's say we have the following text in many different languages. Some >> markup is changed so you know what I mean. >> >> <bold>Welcome to our company</bold><br><br>Here is some long >> text.....<ul><li>some [BOLD]text[/BOLD]</li><li>other text</li></ul> >> >> Now imaging this text to be very long. >> >> Now, my question is this. How do you handle tagged markup for different >> languages without repeating markup tags. >> >> * Variation and the text in the html file. >> * different properties file with markup in it >> * Other technique? >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org