forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sjur Nørstebø Moshagen <>
Subject Re: i18n suggestion
Date Tue, 16 Mar 2004 11:12:21 GMT
På 16. mar. 2004 kl. 12.48 skrev Upayavira:

> wrote:
>>>     <map:select type="resource-exists">
>>>       <map:when test="{../1}/{../2}.{lang}-{country}.xml">
>>>           <map:generate src="{../1}/{../2}.{lang}-{country}.xml"/>
>>>        </map:when>
>>>        <map:when test="{../1}/{../2}.{lang}.xml">
>>>           <map:generate src="{../1}/{../2}.{lang}.xml"/>
>>>        </map:when>
>>>        <map:otherwise>
>>>          <map:generate 
>>> src="{../1}/{../2}.{global:default-lang}.xml"/>
>>>        </map:otherwise>
>>>      </map:select>
>> But on forrest there are txt,ehtml,ihtml,sxw,cwiki extensions, not 
>> only xml .
> 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.)

And won't you have to repeat the above on every other sitemap you might 
have defined? No, I don't like the idea too much, even though it does 
the job. Your previous suggestion actually looked much better - a 
slightly more complex generator (than standard) that you can use where 
and when it's needed.

One more thing to remember: before (or after?) trying the default 
language, one should also try the exact requested filename (except for 
the .xml suffix). This way it is easy to override whatever locale 
preferences are set, to be used for simple locale override cases, and 
for debugging (as I mentioned earlier).


View raw message