Internalization a site using forrest 0.7-dev

Posted on

I think that many people are asking for a way to display the same look and feel and different language using forrest.

I gather some information about how to do it here. I used this example for español and English example.

    1. First you need to download a dev version as for today (10 May 2005)
      forrest seed
      set project.i18n=true on forrest.properties
      copy index.xml to index.es.xml
      modify index.es.xml to display some Spanish text

This should be enough for test if your setup is right.
load on your browser http://localhost:8888/ and change language. If everything goes right. you should be able to see the menus, tabs and content in Spanish (or whatever).

Now that we know that is it working on a live server, we are going to put it on a static view. We are going to start with a default language en (English)

    1. cp $FORREST_HOME/main/webapp/WEB-INF/cli.xconf /var/tmp/fs
      add project.configfile=/var/tmp/fs/cli.xconf to forrest.properties
      modify cli.xconf and add this line:
      <uri type=”insert” src-prefix=”” src=”index.html” follow-links=”false” dest=”/var/tmp/fs/build/i18n/*.en” />
      run forrest site

You should be able to see the fresh-site with all the files ending on html.en . Next is the turn of the alternative language.. Spanish.. 🙂

    1. export LANG=es
      modify cli.xconf and change the dest attribute on the uri element from *.en to *.es
      execute forrest site

That should be enough in order to test it. you need to copy the destination folder (/var/tmp/fs/build/i18n) to a web directory in an Apache server. Well, I do a (cd /var/www; ln -s /var/tmp/fs/build/i18n i18n) but that is because I run a web server on my laptop. so http://localhost/i18n is enough for me to test.

Cheers,
Cheche