forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: i18n suggestion
Date Tue, 16 Mar 2004 12:31:02 GMT

> Okay. So you're saying that the above method becomes too complex when 
> you've got multiple formats (four tests per resouce, six source file 
> types, gives 24 different <map:when> clauses, which certainly is clunky.)

What I did on forrest was create a resource called "file-resolver" and
pass the {lang} out of the localeAction:

<map:act type="locale">
  <map:call resource="file-resolver">
    <map:parameter name="uri" value="{../1}_{lang}"/>

Then use the SourceExistsSelector to find out a localice version of any
of the sources:

<map:resource name="file-resolver">
      <map:select type="exists">
        <map:when test="{project:content.xdocs}{uri}.ihtml">
        <map:when test="{project:content.xdocs}{uri}.cwiki">

So what it is missing is to have the default language and the fall-back.


View raw message