Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Adrian Alexa 50 posts 100 karma points
    Jan 11, 2012 @ 09:00
    Adrian Alexa
    0

    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.

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Jan 11, 2012 @ 10:00
    Michael Latouche
    0

    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.

  • Owen 123 posts 246 karma points
    Jan 11, 2012 @ 13:03
    Owen
    0

    If two websites have same layout, you only need a template, then put static content into dictionary.

  • Adrian Alexa 50 posts 100 karma points
    Jan 12, 2012 @ 10:08
    Adrian Alexa
    0

    owen I like your solution but then how will the page' know which is the current language' ? is there any tutorial for that?

  • Owen 123 posts 246 karma points
    Jan 12, 2012 @ 10:17
    Owen
    0

    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.

     

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Jan 12, 2012 @ 10:23
    Michael Latouche
    0

    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.

  • Adrian Alexa 50 posts 100 karma points
    Jan 12, 2012 @ 10:23
    Adrian Alexa
    0

    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

     

     

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Jan 12, 2012 @ 10:27
    Michael Latouche
    0

    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.

  • Adrian Alexa 50 posts 100 karma points
    Jan 12, 2012 @ 11:03
    Adrian Alexa
    0

    oh yeah, it is good documentation, thanks

  • Adrian Alexa 50 posts 100 karma points
    Jan 12, 2012 @ 13:36
    Adrian Alexa
    0

    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

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Jan 12, 2012 @ 13:45
    Michael Latouche
    0

    Mmh strange.

    Did you include the assemblies in your references or bin folder?

    Cheers,

    Michael.

  • Adrian Alexa 50 posts 100 karma points
    Jan 12, 2012 @ 13:46
    Adrian Alexa
    0

    i included umbraco just, is there any reference I have to do?

  • Adrian Alexa 50 posts 100 karma points
    Jan 12, 2012 @ 13:50
  • Adrian Alexa 50 posts 100 karma points
    Jan 12, 2012 @ 14:23
    Adrian Alexa
    0

    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))" /> ?

  • Adrian Alexa 50 posts 100 karma points
    Jan 12, 2012 @ 14:35
    Adrian Alexa
    0

    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)]" />

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies