asked    Tabitha     2018-10-12       c#       23 view        1 Answer

[SOLVED] Umbraco multilanguage with URL change

I am working with Umbraco v7.x. I have few static pages and they need to be added in two languages(en/da).

I know there are two ways to translate

1- Copy folder and assign different culture and hostname and add fields data according to language.

2 - Use dictionary items.

But my problem is customer wants to have custom fields on all pages so he can change static page data without having the need to ask developer. So if I use first method to change language that would also change URL which is not required for this solution.

Second I use dictionary than how can customer can change field data because he had to go to dictionary items and make any change there. This is not a problem but text needs to be formatted and this is not possible if I use dictionary items.

Any work around to this problem.

Thanks

  1 Answer  

        answered    Frank     2018-10-12      

I recommend using Vorto if you want a 1:1 translated site (meaning each piece of content has a translation for each language. Use dictionary items for text that was hard-coded into your template but Vorto will wrap your property editors so that you can edit each language in the same node. You can then use HasVortoValue() and GetVortoValue() instead of HasValue() and GetPropertyValue() methods that come with Umbraco. This will return the correct value based on the culture of the request. You will also need to configure Umbraco to load the multilingual content by setting a host name and associate that with a culture. You do that by selecting "Culture and Hostnames" in the contextual menu for the home node and and click "Add Domain" (you will need to have first added the language in the Settings section):

Culture and Hostnames dialog

Alternatively, if you want to use a subfolder for each language instead of a differeent domain (e.g. sitename.com/english instead of english.sitename.com) you can create a custom Content Finder. I have written a couple blog posts on how to do that here and here.





Your Answer





 2018-10-12         Hedda

PartialView inside modal Popup

I am trying to open PartialView inside jquery modal Popup on a link click event in my MVC, Umbraco project. The partial view loads fine however submitting the button inside modal popup calls the ActionMethod correctly but then instead of opening the modal popup in the same parent window it launches it in a new window. No sure what i am doing wrong here. Below is my code:Partial View @inherits Umbraco.Web.Mvc.UmbracoViewPage<Source.Models.SchoolFindYouModel><script> $(function () { $("#dialog-modal-school").dialog({ autoOpen: false, ...
 jquery                     1 answers                     3 view
 2018-10-12         James

Model Popup state

I am displaying a form in Jquery model popup using MVC Partial View. On submit I call my action method to validate user input and if validation fails I need to populate the modal popup again. The problem I face is,on submit it calls the child action method, I'm able to get the ViewData.ModelState.IsValid in my partial view however not been able to auto display the modal popup depends on ModelState value. I tries below jquery code but no luck.Partial View@inherits Umbraco.Web.Mvc.UmbracoViewPage<WebApplicationDemo1.Models.JobAlertModel><script> $(function ...
 javascript                     1 answers                     4 view
 2018-10-12         Una

Umbraco 7 examine JSON search - autocomplete not working

I have a working search box and wanted to add autocomplete functionality. It keeps displaying "No search results."When I type the word "Umbraco" into the input, I do see the following in the console, but it's not autocompleting:[{"id":"http://localhost:33968/explore/our-umbraco/","label":"Our Umbraco","value":"Our Umbraco"},{"id" :"http://localhost:33968/extend/umbraco-forms/","label":"Umbraco Forms","value":"Umbraco Forms"}]HTML<form method="post" action="/results"> <input type="text" id="searchTerm" name="searchTerm" size="21" maxlength="120"> <input ...
 jquery                     1 answers                     5 view