Copied to clipboard

Flag this post as spam?

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


  • nojaf 91 posts 300 karma points
    Apr 26, 2014 @ 00:18
    nojaf
    0

    Could you give me an example what you mean with the language x-path configuration. How does a language node look like?

  • Matt Brailsford 2149 posts 10593 karma points MVP 6x c-trib
    Apr 26, 2014 @ 08:09
    Matt Brailsford
    1

    Hey nojaf,

    Good question :)

    To answer, it's important to understand where Vorto looks up it's languages. It doesn't just the list of languages defined in the settings section, instead, it only uses languages that are actually "in use" on the website, so that means, it only uses languages that are assigned to nodes using the "hostname and cultures" dialog.

    So, if you don't supply an xpath statement, Vorto will lookup in the database all languages in use as "cultures" and return those. If you want to be more specific though, for example, maybe you run multiple multi-lingual websites in one install, with both sites supporting different languages, and you don't want un-used languages from site A to be visible in site B, then this is when the XPath comes in handy.

    So the XPath field allows you to provide and XPath statement that Vorto should use to find specific nodes with cultures defined (rather than all of them). The XPath support 3 key variables,

    $currentPage = the current page you are currently editing

    $parentPage = the parent page of the page you are currently editing

    $ancestorOrSelf = the current page, or parent page (if current page isn't available, such as during create) of the page you are currently editing.

    So as an example, you could have something like the following:

    $parentPage/ancestor-or-self::Region/LanguagePage[@isDoc]
    

    Which says, starting from the parent page of the page I am editing, look back through my ancestors till you find a page with the doc type alias of "Region", then find all nodes underneath that with a doc type alias of "LanguagePage".

    Hopefully this gives you a good understanding of how the XPath statements work, but if you need any more information, don't hesitate to ask.

    Many thanks

    Matt

  • nojaf 91 posts 300 karma points
    Apr 26, 2014 @ 09:28
    nojaf
    0

    Hello Matt,

    Thanks for the quick and detailed response. What I'm trying to achieve is one single site (one tree) in umbraco that has three languages. So how do I configure this? Seems like I can only point one culture to the root node. Should I create some structure that contains the languages then?

  • Matt Brailsford 2149 posts 10593 karma points MVP 6x c-trib
    Apr 28, 2014 @ 09:59
    Matt Brailsford
    0

    Hi nojaf,

    Ahh, good point. As it stands, you'd probably have to define multiple domains for the root node (you don't have to use them, but that's the only way to define multiple languages for a node).

    Sounds like it might be an idea for me to add support for using all setup languages, or just languages in use, that way it should be more flexible.

    I'll get it added in the next release.

    Matt

  • dillorscroft 193 posts 187 karma points
    Apr 28, 2014 @ 12:11
    dillorscroft
    0

    Thanks for a great package.  Looks to be exactly what I need on this particular project.

    One questions....What properties should be within the language node?

    Thanks

    Matt 

  • Matt Brailsford 2149 posts 10593 karma points MVP 6x c-trib
    Apr 28, 2014 @ 12:51
    Matt Brailsford
    1

    Hi dillorscroft,

    What properties you have on the language nodes is not important, it's just the fact you need nodes with language cultures defined upon them (via the hostnames dialog). Beyond that, the rest is up to you.

    Does that make sense?

    Matt

  • dillorscroft 193 posts 187 karma points
    Apr 28, 2014 @ 13:24
    dillorscroft
    0

    I think I may have been lookign at it slightly differently.  

    Guess I need to think of my architecture but I'm tryign to implement with one domain and not /en or /de folders either for example.  Was going to go old school and stick culture/language selection in a cookie when a flag was selected but defaulting to English.  

    A screener would be awesome.

    Matt

     



     

  • Matt Brailsford 2149 posts 10593 karma points MVP 6x c-trib
    Apr 28, 2014 @ 14:02
    Matt Brailsford
    1

    Hey dillorscroft,

    That's cool, and to be honest, probably how most people will use it. I just created vorto based on my needs, so probably didn't think that all through properly.

    I'm gonna try and take a look tonight and add support for using all installed languages, not just in-use languages, so that way it can support both.

    Matt

  • Matt Brailsford 2149 posts 10593 karma points MVP 6x c-trib
    Apr 28, 2014 @ 20:41
    Matt Brailsford
    1

    Ok, I've just released an updated package which allows you to set the language source. The option can be either "installed" which will just use all languages found in the "languages" section within umbraco, or "in-use" which will use languages that are found to be in use on the site via the hostnames dialog.

    Hopefully this should simplify things a little for you both.

    Many thanks

    Matt

  • nojaf 91 posts 300 karma points
    Apr 29, 2014 @ 09:41
    nojaf
    0

    Hello Matt,

    Thanks for the quick update. This is really helpful.

    h5yr!

    nojaf

  • Manjunatha Govindappa 20 posts 114 karma points
    Sep 01, 2017 @ 05:16
    Manjunatha Govindappa
    0

    Could you please give brief description on the behavior Sync check box as shown in the screen shot belowenter image description here

Please Sign in or register to post replies

Write your reply to:

Draft