[Yanel-dev] Translations

Michael Wechner michael.wechner at wyona.com
Wed Apr 18 10:21:33 CEST 2007


Josias Thöny wrote:

> Michael Wechner wrote:
>
>> Hi
>>
>> Thanks to Josias we can now link arbitrary URLs which are 
>> translations of each other, see for instance
>>
>> src/realms/yanel-website/content/translations.xml
>>
>> I would like to make some suggestions:
>>
>> 1) I think it would be good if we could introduce a root node
>>
>> <translations>
>>  <pages>
>>
>> instead only <pages> in order to make clear what this file is good 
>> for from a self-contained point of view.
>
>
> That's fine with me. Although if <pages> is the only child of 
> <translations>, I'm not sure if it makes sense to have both.


well, I thought that we might add other elements as well below 
translations, e.g.

<translations>
<availalable-languages>en, de, es, ...</
<pages>

>
>>
>>
>> 2) I think we need to introduce a namespace in order to comply with 
>> DOM2 (at least a default namespace)
>
>
> Actually I don't think DOM2 *requires* namespaces, but it's ok with me 
> to add one.


Ok, I would suggest something like

http://www.wyona.org/yanel/translations/1.0

whereas maybe add something denoting this specific implementation

>
>>
>> 3) I think we should introduce a default mapping implementation, e.g.
>>
>> <translations  default-impl-class="Suffix.class">
>>
>> e.g. /about_en.html and /about_de.html
>>
>> or
>>
>> <translations default-impl-class="Prefix.class">
>>
>> e.g. /en/about.html and /de/about.html
>>
>> whereas these implementations would only apply if no 
>> <page><translation path="... would be found.
>
>
> Actually I considered the translation file as internal to the 
> translation implementation. That's why I wrote in another mail that 
> the file should only be edited via the API.


right

> For the same reason I would rather implement the default mapping right 
> into a subclass of the DefaultTranslationManager and make this class 
> configurable per realm.


you mean within the realm config file? Makes sense to me :-)

Thanks

Michi

>
> josias
>
>
>>
>> WDYT?
>>
>> Cheers
>>
>> Michi
>>
>
>
> _______________________________________________
> Yanel-development mailing list
> Yanel-development at wyona.com
> http://wyona.com/cgi-bin/mailman/listinfo/yanel-development
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner at wyona.com                        michi at apache.org
+41 44 272 91 61




More information about the Yanel-development mailing list