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).
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
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
I kept on getting the same "recipe ideas" in the StringText variable
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 .
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.
Are you on a new version of Umbraco? Check out this example I just made:
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>
}
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).
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
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
I kept on getting the same "recipe ideas" in the StringText variable
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
Hi Alex,
i did . i have set the languages . I still haven't gotten it . Its still taken me time to figure it out .
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/
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
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.
Are you on a new version of Umbraco? Check out this example I just made:
Here's the code:
This was done in Umbraco 7.4.1.
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 .
is working on a reply...