One-Root Multi-language site
Hia all.
Ok, I can build a TYPOlight site with many languages by using a site root per language.
In a moment this becomes cumbersome.
Is there a way to build a multilanguage site with only one root?
Here is how I imagine it.
1. Build the site with only one root.
2. In the pages create articles for each language.
3. Put language specific content elements in the corresponding articles.
...
Unfortunately I do not see a field "language" in the article (tl_article.lang).
May be there is some extension which will allow me to build such a site. Please share if there is something like this.
As I am writing this I start to think how it could be implemented.
The extension may consist of two parts: backend and fronted.
The backend may add a new column "lang" to tl_article table
The frontend will replace the default frontend.
It will just "select * from tl_content where pid=? order by sorting" the pid is the langauge specific tl_article.id.
the rest should be the same as now.
I would do it if I knew better TYPOlight internals... may be some day...
Thanks.
Re: One-Root Multi-language site
The best way for work with multilingual sites its with one root for lang. Now, maybe you can try this extension module i think is similar to what your looking for.
Re: One-Root Multi-language site
Ok
As I understand also from this post http://www.typolight-community.org/v...&t=273&start=0
Typolight does not support one-root multilanguage sites.
But it will be definitely easier to maintain a multilanguage site with only one root.
Imagine what happens when you have 20 or more pages in a tree. It becomes a mmess hard to maintiain.
Also if you use some modules you need to make copies of them just because of the language.
In TYPO3 CMS for example this was not needed. If the used strings in a module are translated they automatically switch to the current language. And you do not need to copy the module to point to another page.
Hope you understand what I am talking about.
Anyway this would be a Very good to have feature.
Here is how we could achieve multi-language menu with only one root supposing that we have a "lang" column in table tl_article
Code:
SELECT c.* FROM tl_pages as p, tl_article as c
WHERE
p.pid=?
AND c.pid=p.id
AND (c.lang=?)
AND (c.published=1)
---other constraints here
ORDER BY p.sorting
LIMIT 1000
Calling this query recursively will do the job.
May be I need to make a feature request :).