Copied to clipboard

Flag this post as spam?

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


  • Akeem 43 posts 198 karma points
    Apr 06, 2016 @ 22:40
    Akeem
    0

    Umbraco MultiSite Language translation

    Hi ,

    Please can someone help me here . I have created my site with the french and English Version . Now i want to switch between the site such that my i click the EN at the top of my page , it loads the enlish Version of my currentpage (vice-versa).

    enter image description here

    I have read several blogs and i have created a dictionary items of my Page Names (e.g recipe ideas ) , have set the domains and i have a function like this in my controller

    enter image description here

    The switch between the languages is in my master layout .. so i have tried to test that out but the result is still the same . Nothing gets translated

    Below is what am coding in my master layout enter image description here

    I kept on getting the same "recipe ideas" in the StringText variable

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Apr 07, 2016 @ 21:50
    Alex Skrypnyk
    0

    Hi Akeem,

    Did you add language settings to your root nodes?

    Great article how to build such switcher - http://24days.in/umbraco/2014/razor-language-switcher/

    Cheers, Alex

  • Akeem 43 posts 198 karma points
    Apr 08, 2016 @ 00:54
    Akeem
    0

    Hi Alex,

    i did . i have set the languages . I still haven't gotten it . Its still taken me time to figure it out .

  • Aristotelis Pitaridis 84 posts 402 karma points
    Apr 08, 2016 @ 13:44
    Aristotelis Pitaridis
    0

    If the urls between the different languages are the same and the only difference is the language code, you can try this example here.

    http://www.computermagic.gr/tutorials/umbraco-7/multilanguage-site/language-selector/

  • Akeem 43 posts 198 karma points
    Apr 08, 2016 @ 16:51
    Akeem
    0

    The Urls are not the same because the Page name has been changed to french for french Site. The English site still keep its name . Yes , that make it a little bit complicated .

    Please help lol .. i need solution to this so bad

  • Aristotelis Pitaridis 84 posts 402 karma points
    Apr 08, 2016 @ 17:10
    Aristotelis Pitaridis
    0

    In order to solve a lot of problems in multi-language sites I use the umbracoUrlName property so that I will be able to have different name for the each localized page and at the same time I have the ability to use common url name.

    The only thing that you have to do is to create a property to all your documents or to the MasterPage template which will have the alias name umbracoUrlName and type Textstring. If you type a value (I type the English name of the page) it will override the default url name and use the one that you declared in this property. This is not hard to do because you define it in your first language and after copying the entire tree in order to create the other languages it will have the same value for each of the localized pages.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 13, 2016 @ 02:56
    Nicholas Westby
    100

    Are you on a new version of Umbraco? Check out this example I just made:

    Example

    Here's the code:

    @{
        var service = ApplicationContext.Current.Services.LocalizationService;
        var item = service.GetDictionaryItemByKey("Hello");
        var translations = item.Translations.Select(x => new
        {
            Language = x.Language.CultureInfo.ThreeLetterISOLanguageName,
            Value = x.Value
        }).ToArray();
    }
    
    @foreach(var translation in translations)
    {
        <p>
            @translation.Language
            <br />
            @translation.Value
        </p>
    }
    

    This was done in Umbraco 7.4.1.

  • Akeem 43 posts 198 karma points
    Apr 19, 2016 @ 15:03
    Akeem
    0

    Hi Nicholas,

    Thank you Nicholas, you guys are the best . I later got help . LINK below .

    https://our.umbraco.org/forum/templates-partial-views-and-macros/76609-jquery-ajax-call-to-send-data-to-the-method-when-the-a-href-clicked

    thanks .

Please Sign in or register to post replies

Write your reply to:

Draft