Ideally the markup should stay in the markup file and the text in that
markup that needs to be localized would be localized via wicket:message and
a properties file. In cases like below, you would break the text into
properties-localized hunks and into panels with multiple markup localization
files where markup is truly being localized (you have little other choice if
the styling needs to be localized). How that's split up is up to you. In the
example you gave, maybe:

<bold><wicket:message key="welcome"/></bold><br><br><wicket:messsage
key="longText"/>
<div wicket:id="bulletPanel"/>

welcome=Welcome to our company
longText=Here is some long text....

BulletPanel.html_en
<wicket:panel>
<ul><li>some [BOLD]text[/BOLD]</li><li>other text</li></ul>
</wicket:panel>

i would generally try to avoid putting much markup in properties files since
that's a surprising use of properties files.


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?
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/What%27s-your-take-on-handling-markup-in-properties%2C-html%2C-wicket-tp21995782p22000045.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to