Hi Lenya devs,
this thought just occured to me (maybe something for a
later version):
Currently, the DocumentIdToPathMapper is responsible for
evaluating the language suffix (_en, _de, ...) to determine
the language. The remaining path is used to determine the
location in the sitetree.
Is this indirection really necessary? The only advantage
I'm aware of is that you can change the language suffix without
touching the sitetree. But I have never heard about this
requirement.
An example - here's what we have now:
URL space:
/dev_en.html
/dev_de.html
<site>
<node id="dev" uuid="123">
<label xml:lang="en">Developer</label>
<label xml:lang="de">Entwickler</label>
</node>
</site>
Without the DocumentIdToPathMapper, the sitetree would look
like this:
<site>
<node id="dev_en" uuid="123" xml:lang="en">Developer</node>
<node id="dev_de" uuid="123" xml:lang="de">Entwickler</node>
</site>
The user would just enter the node ID ("dev"), the language suffix
would be added automatically by some customizable class within the
create usecase.
When a language URL prefix or separate node IDs for the translations
are used, it would also be nice to use the <node> elements to specify
the language:
/en/dev.html
/de/dev.html
<site>
<node id="en uuid="abc" xml:lang="de">German
<node id="dev" uuid="123" xml:lang="en">Developer</node>
</node>
<node id="de">
<node id="dev" uuid="123" xml:lang="de">Entwickler</node>
</node>
</site>
/dev.html
/entw.html
<site>
<node id="dev" uuid="123" xml:lang="en">Developer</node>
<node id="entw" uuid="123" xml:lang="de">Entwickler</node>
</site>
The last case would basically correspond to the language suffix:
dev_en <=> dev
dev_de <=> entw
WDYT about this concept?
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]