Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey! How can I specify fallback lang using vorto?
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.ContentPageBase> @using ContentModels = Umbraco.Web.PublishedContentModels; @using Our.Umbraco.Vorto.Extensions @{ Layout = null; } <html> <head> <title>@Model.Content.GetVortoValue("title")</title> </head> <body> <p>@Model.Content.GetVortoValue("lead")</p> </body> </html>
This is my code.
Hi
Where are you storing fallback lang data?
Alex
Hi Nso,
Its built in, just pass the default language along with the property you're trying to get like this:
For a grid property: @Html.Partial("Grid/Standard", Model.Content.GetVortoValue("grid", "en"))
For a simpler one like a text string: @Model.Content.GetVortoValue("grid", "en")
Hope this helps,
Amir
Amir, second param in "GetVortoValue" is "cultureName", I think we need "fallbackCultureName"
I am changeing the default language with hosts and domain.
It is making English for all
Do you have the culture / hostnames / domain set for each of your languages in Umbraco?
Should look something like this: http://www.domain.com/en > set language to en http://www.domain.com/es > set language to es
-Amir
Hi Guys
I think you have to use this code:
<p>@Model.Content.GetVortoValue("lead", fallbackCultureName: "en")</p>
Specify "fallbackCultureName" param name.
Thanks,
Hi Nso
Did you solve the issue?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Vorto specify fallback lang
Hey! How can I specify fallback lang using vorto?
This is my code.
Hi
Where are you storing fallback lang data?
Alex
Hi Nso,
Its built in, just pass the default language along with the property you're trying to get like this:
For a grid property: @Html.Partial("Grid/Standard", Model.Content.GetVortoValue("grid", "en"))
For a simpler one like a text string: @Model.Content.GetVortoValue("grid", "en")
Hope this helps,
Amir
Amir, second param in "GetVortoValue" is "cultureName", I think we need "fallbackCultureName"
I am changeing the default language with hosts and domain.
It is making English for all
Hi Nso,
Do you have the culture / hostnames / domain set for each of your languages in Umbraco?
Should look something like this: http://www.domain.com/en > set language to en http://www.domain.com/es > set language to es
-Amir
Hi Guys
I think you have to use this code:
Specify "fallbackCultureName" param name.
Thanks,
Alex
Hi Nso
Did you solve the issue?
Thanks,
Alex
is working on a reply...