Copied to clipboard

Flag this post as spam?

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

  • Emil Schoelzer Schnohr 21 posts 141 karma points
    3 days ago
    Emil Schoelzer Schnohr

    Translation Manager - Get related/language variant node

    I got a site using the Jumoo Translation Manager package, and with 2 languages (english and spanish). They are created separately under 2 root nodes, one for /en and one for /es.

    When creating a node in the english site, one is automatically created in the spanish one too (TM package handles this). I need to programmatically (C#/razor) find the spanish version of i.e. the home page and vice versa. The whole point is that the user can stay on i.e. the contact page, when changing language. Right now it just send them to the frontpage.

    The database has a table called dbo.Translate_Nodes, and this is what I need. Every line here has a "masterId" (id of the english node) and a "targetId" (id of the spanish node). So there's my link.

    I guess one way is to write an API getting them with SQL, but I'm wondering if the Translation Manager package might have some built in APIs or something, that I can use? Their documentation doesn't really mention this as far as I can tell, so I hope some bright person out there can help me out!

  • Marc Goodson 1770 posts 11736 karma points MVP 7x c-trib
    2 days ago
    Marc Goodson

    Hi Emil

    When the page is copied then a link between the two may be created as an Umbraco Relation... Look in the settings section for Relation types...

    You.can use the Relations Service to programmatically find pages related to another page for a particular relation type...

    There is a good introduction here:

    There is another JuMoo package called Linked Pages that I usually add on 1-1 translated sites that shows on a particular page what the equivalent linked pages are in each language site...



  • Emil Schoelzer Schnohr 21 posts 141 karma points
    9 hours ago
    Emil Schoelzer Schnohr

    Hi Marc

    The Relations Service is what I was looking, I haven't used it before.

    Big thanks!

Please Sign in or register to post replies

Write your reply to: