struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Dumoulin <ced...@apache.org>
Subject Re: Internationalizing large amounts of text
Date Wed, 31 Jul 2002 15:37:00 GMT

  Hi,

  You can also use Tiles and its i18n capabilities:
Transform your large paragraphs into tiles (i.e. a jsp or an html), one 
for each language.  Save your tiles in your web application:
   mysite/tiles/fr/bigParagraph.jsp
   mysite/tiles/en/bigParagraph.jsp

Create a default definition file 'tiles-def.xml' containing one 
definition for each paragraph:
...
<definition name='bigParagraph' path='/tiles/en/bigParagraph.jsp' />
...

  For each language, create another definition files (ex : 
tiles-def_fr.xml'). The file name should use java i18n naming scheme. In 
this file, overload the default definitions when needed. Specify the 
path for your translated tiles.
...
<definition name='bigParagraph' path='/tiles/fr/bigParagraph.jsp' />
...

And now, in your jsp pages, insert the definition where you want it to 
be displayed:
<tiles:definition name="bigParagraph" />

Tiles will select the appropriate definition according to the local.
An old example of this i18n capability is provided in  
tiles-documentation.war, under the tutorial subdirectory.

  Cedric

Steven Banks wrote:

>I have been asked to convert some static html pages to jsp pages using Struts.  These
pages include several very large paragraphs, like important notices and privacy statements.
>
>Should all this text be put into the applicationResource.properties file?  Is it acceptable
to have the appropriately internationalized static html text included in the page using an
equals tag to determine which language version to include.  
>
>
>
>Steven Banks
>368-0566
>
>
>--
>To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
>
>
>  
>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message