Juan Jose Pablos wrote:
> Sean Wheller wrote:
>
>>Hi,
>>
>>I would like to translate my web site to a number of languages and have the
>>possability for uses to select their language of preference using a
>>drop-list. In forrest.properties I see
>>#I18n Property only works for the "forrest run" target.
>>#project.i18n=true
>>
>>Seems this will only work within a webapp environment.
>>
>>Anyone have sugestions on how I can implement this?
>
This patch will allow you to output the site base on the language of the
systems. I put some information on my blog I hope that it will help you out:
http://casa.che-che.com/blog/
still not complete, when finish, I will import it using rss2document.xsl
:-)
Cheers,
cheche
Index: forrest.build.xml
===================================================================
--- forrest.build.xml (revisión: 169445)
+++ forrest.build.xml (copia de trabajo)
@@ -100,7 +100,16 @@
<property name="build.plugins-dir" value="build/plugins"/>
<property name="forrest.skins-dir" location="${forrest.core.webapp}/skins"/>
<property name="forrest.plugins-dir" location="${forrest.home}/${build.plugins-dir}"/>
- <property name="project.site-dir" location="${project.build-dir}/site" />
+ <!-- If the user wants to build i18n in diferent locations this is one way to implemented it-->
+ <if>
+ <equals arg1="${project.i18n}" arg2="true"/>
+ <then>
+ <property name="project.site-dir" location="${project.build-dir}/site/${env.LANG}" />
+ </then>
+ <else>
+ <property name="project.site-dir" location="${project.build-dir}/site" />
+ </else>
+ </if>
<property name="project.war" location="${project.build-dir}/${project.name}.war" />
<property name="project.webapp" location="${project.build-dir}/webapp" />