Hi,
First of all, thanks for providing this fantastic package.
I am converting my non-umbraco single-language site into multi-language umbraco site. So to starts with I have only English content. Is there any way in Vorto to fallback the language to default language if selected language/culture is not configured for a given property?
(e.g., If user has selected 'Spanish' language and a property does not have any 'Spanish' content then return English (default) content).
Thanks for this update - but there is no way to do it the whole website? do I have to add a language name to every Model.Content.GetVortoValue("leftColContent")?
I think that most of the developers prefer this behavior by default so the page would have any content until we get it translated. Its good for multilingual users...
Maybe an option to define a fallback language at the data-type would be a good solution.
Its a really great package BTW. I think that this feature and a dynamics support would make it perfect ;-)
Matt, can you point to an example for the fallback functionality? thanks
to expand upon this... i have english and spanish, and when i visit the site, all the links are to /es links... i would love them to be /en links... thanks
I have English as hard-coded default/fallback language. But if want to make it configurable, you can configure in one of your top-level node (as a property which you can retrieve in your master template). In my content-architecture, I kept one 'settings' node under which I put site-specific configuration and I populate that node in my master-template so that I can use it in anywhere in views.
Alternatively, if you have only one default language per application then you can leverage on web.config as well.
Fallback to default lnguage in Vorto
Hi,
First of all, thanks for providing this fantastic package.
I am converting my non-umbraco single-language site into multi-language umbraco site. So to starts with I have only English content. Is there any way in Vorto to fallback the language to default language if selected language/culture is not configured for a given property? (e.g., If user has selected 'Spanish' language and a property does not have any 'Spanish' content then return English (default) content).
Thanks, Nirmit
You will have to create your own extension function for that, the one I use is:
just noticed that I never fully implemented the function , a complete one is below.
Thanks Patrick, I ended up with similar approach. I wrote my own extension to fallback to supplied default language. However my code is in C#.
Thanks for your input.
just for reference, my version of the extension:
Hey Guys,
Just to let you know, I've added fallback culture name support into the latest 1.4 release.
Thanks for the feedback.
Matt
Hey Matt,
Thanks for this update - but there is no way to do it the whole website? do I have to add a language name to every Model.Content.GetVortoValue("leftColContent")?
I think that most of the developers prefer this behavior by default so the page would have any content until we get it translated. Its good for multilingual users... Maybe an option to define a fallback language at the data-type would be a good solution.
Its a really great package BTW. I think that this feature and a dynamics support would make it perfect ;-)
Are you planning any new release soon?
Thanks!
Matt, can you point to an example for the fallback functionality? thanks to expand upon this... i have english and spanish, and when i visit the site, all the links are to /es links... i would love them to be /en links... thanks
@MattBrailsford any chance you could take a look at this Vorto related question? https://our.umbraco.com/forum/using-umbraco-and-getting-started/97531-how-to-change-my-currentuiculture
Thanks Matt. Much appriciated. I dont have to maintain a custom code now.
Hi, How do you set / retrieve the fallback language?
I have English as hard-coded default/fallback language. But if want to make it configurable, you can configure in one of your top-level node (as a property which you can retrieve in your master template). In my content-architecture, I kept one 'settings' node under which I put site-specific configuration and I populate that node in my master-template so that I can use it in anywhere in views.
Alternatively, if you have only one default language per application then you can leverage on web.config as well.
Hope this will be helpful.
Regards,
Nirmit
For anyone who is still looking for this, here's what worked for me for a grid editor data type.
I was looking to show any available languages as a fallback with the chosen default language first then the others.
So I have created this simple extension method that might be useful for someone:
is working on a reply...