Copied to clipboard

Flag this post as spam?

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


  • Matt James 3 posts 23 karma points
    Sep 30, 2010 @ 19:22
    Matt James
    0

    Multilingual help

    So sorry if this is the incorrect place to post.  I just started looking into Umbraco and need to leverage multilingual capabilities.  I looked through the book on the subject and other posts on the subject and can't seem to get the basics working.

    I added the languages de, fr and uk english in the backend and made tabs for the other languages in the doctype.

    However, when I try to access the page passing lang=de or lang=fr in the querystring it does not change my content.

    Additionally I tried adding the xslt macro mentioned in the book and dropping it in the template but this did not help either.

    Any help would be greatly appreciated.

    ~Matt

  • Lennart Stoop 304 posts 842 karma points
    Sep 30, 2010 @ 19:55
    Lennart Stoop
    0

    Hi Matt,

    Personally I prefer to use a different approach by setting up languages in the content tree rather than using tabs in document types.

    However your approach should also work, and is described in detail here:

    http://umbraco.org/documentation/books/multilingual-11-sites/summary-of-the-multilingual-11-site-system

    For sure you need the macro which handles the language parameter in the url and activates the session language.

    Have you set up properties in the document type for each language using a suffix and are you outputting the contents as shown in the XSLT below?

    <xsl:value-of select="$currentPage/data[@alias = concat('ALIASNAME',$flang)]" />

    Also, which version of Umbraco are you using, I am not sure if the above statement will work with the new XML schema in 4.5.2

  • Matt James 3 posts 23 karma points
    Sep 30, 2010 @ 20:02
    Matt James
    0

    Hi Lennart,

      I am open to any option that will make this work easily  ;)

    I have added properties in the doctype, for example ... I added a bodyText_de property under a new tab called Content (German)

    I think the bit that I am missing is the XSLT you mention ... not sure where that goes or how it's referenced.

    Also, I am using version 4.5.2

  • Lennart Stoop 304 posts 842 karma points
    Sep 30, 2010 @ 20:29
    Lennart Stoop
    0

    Hey Matt,

     

    Normally your document type should have a template which uses a macro to output your content.

    That macro is related to an XSLT file (e.g. body.xslt) which

    a) includes the XSLT file which handles the language (in the guide its called lang_lib.xslt)

    b) outputs your document's properties by concatenating the property alias and the language var

    I don't have any projects using this approach so I'm afraid I can't provide any code samples.

    If you are just testing multilingual capabilities, I would recommend trying this approach:

    http://our.umbraco.org/wiki/how-tos/running-multi-lingual-sites-under-a-single-domain

     

    Greetz

    Lennart

  • Matt James 3 posts 23 karma points
    Sep 30, 2010 @ 20:41
    Matt James
    0

    Thanks, I will check it out. 

Please Sign in or register to post replies

Write your reply to:

Draft