Which is the ideal way to create multilanguage site?
I have a website in 2 languages. You can see it's templates in attachment. I don't like the way it is because I have same divs and structure for twice. And when I have to change in one place I actualy have to change in two.
From what I understand you have a separate template per language. normally you should be able to have only one tepmplate for all languages, if you keep the same page structure on each language of course. If your template itself contains text that needs to be multi-language, you should be able to solve this by using the Dictionary elements.
If you use different hostname for different language, that is easy. You don't need worry about this, Umbraco will get the right value depend on the hostname setting.
BTW, you can search for more information on the forum.
hm..currently the structure is just like this(see atachment)
However i don't like the way it is made(just to mention it wasn't me who started the project)
As design is the same for both languages it is not worthy to complicate.
So I would like to have a template and pages just for once and content to be rendered from dictionary. Can you direct me to a tutorial or give some instructions.
Which is the ideal way to create multilanguage site?
I have a website in 2 languages. You can see it's templates in attachment. I don't like the way it is because I have same divs and structure for twice. And when I have to change in one place I actualy have to change in two.
Hi Adrian,
There are several ways of doing multi-languages websites that you can find on the forum, here are some interesting post about it :
http://our.umbraco.org/forum/core/general/21616-templates-for-multilanguage
http://our.umbraco.org/forum/core/general/21353-multilanguage-website
http://our.umbraco.org/forum/developers/api-questions/10603-How-to-relate-pages-in-a-multi-language-site
www.webmove.be/.../multilanguage-websites-with-umbraco-part1
From what I understand you have a separate template per language. normally you should be able to have only one tepmplate for all languages, if you keep the same page structure on each language of course. If your template itself contains text that needs to be multi-language, you should be able to solve this by using the Dictionary elements.
Hope this helps.
Cheers,
Michael.
If two websites have same layout, you only need a template, then put static content into dictionary.
owen I like your solution but then how will the page' know which is the current language' ? is there any tutorial for that?
If you use different hostname for different language, that is easy. You don't need worry about this, Umbraco will get the right value depend on the hostname setting.
BTW, you can search for more information on the forum.
There is a whole "Multilanguage website with Umbraco" series written by Anthony Candaele.
I reported it in my previous post, but for your specific question, I think Part 2 might give you lots of answers: http://webmove.be/home/blog/blog/2011/august/multilanguage-websites-with-umbraco-part2
It explains how to relate pages in the different languages, talks about host names etc.
Cheers,
Michael.
hm..currently the structure is just like this(see atachment)
However i don't like the way it is made(just to mention it wasn't me who started the project)
As design is the same for both languages it is not worthy to complicate.
So I would like to have a template and pages just for once and content to be rendered from dictionary. Can you direct me to a tutorial or give some instructions.
Thanks a lot,
Adrian
In Part 2 he also speaks anout dictionary items, so I think it is a good starter to solve your problem.
In Part 3 he explains how to relate pages, and how to build the language switch drop down.
Cheers,
Michael.
oh yeah, it is good documentation, thanks
off..at this step i stack
http://web.archive.org/web/20080731093354/http://umbraco.org/documentation/books/multilingual-11-sites/5)-use-the-dictionary-with-an-xslt-extension
it does not recognize
using umbraco.cms.businesslogic;
using umbraco.cms.businesslogic.language;
so no: Language lang = Language.GetByCultureCode(language);
or try { return new Dictionary.DictionaryItem(key).Value(languageid); }
I gues that it was done for an older version of umbraco
Mmh strange.
Did you include the assemblies in your references or bin folder?
Cheers,
Michael.
i included umbraco just, is there any reference I have to do?
hm..i found the problem, had to include cms.dll too
http://forum.umbraco.org/yaf_postst6410_Multilingual-11--Where-did-the-umbracocmsbusinesslogic-go-.aspx
well...I think that mount anythink up..but does not work. It does not render anythink from dictionary.
Isn't this the way i should get a phrase: <xsl:value-of select="hp_trans:translate('All_Rights_Reserved',string($dlang))" /> ?
I suppose that step 4 i missed somethink..(http://web.archive.org/web/20080731092436/http://umbraco.org/documentation/books/multilingual-11-sites/4)-alter-all-field-references)
what do I have when they say
<xsl:value-of select="$currentPage/data[@alias = 'ALIASNAME']" />
- we need to change it to this:
<xsl:value-of select="$currentPage/data[@alias = concat('ALIASNAME',$flang)]" />
is working on a reply...