We are using language variants to create sites in multiple languages.
In previous versions of Umbraco we used to literally copy/paste an existing site which gave us a sample site and then translate what needed translating. Anything that didn't need translating was already there - for example images.
Now as far as we can tell when we create a variant it is blank - i.e. everything needs copying/adding even if it doesn't need changing.
According to the docs it should fallback to the original language:
Sorry if i wasn't clear. We are using Variants BUT when i create a variant it is completely BLANK. It does not fallback to the original language for any fields that are not completed.
Please can you try this one. I noticed you have "fr" as a parameter. I have tried locally without "fr" and it worked for me fine. It is falling back to default language.
Default content / media for variants
We are using language variants to create sites in multiple languages.
In previous versions of Umbraco we used to literally copy/paste an existing site which gave us a sample site and then translate what needed translating. Anything that didn't need translating was already there - for example images.
Now as far as we can tell when we create a variant it is blank - i.e. everything needs copying/adding even if it doesn't need changing.
According to the docs it should fallback to the original language:
https://our.umbraco.com/Documentation/Getting-Started/Design/Rendering-Content/#using-fall-back-methods
@Model.Value("pageTitle", "fr", fallback: Fallback.ToLanguage)
Fallback to language is the default.
Is this correct or is there a way to create a variant via a complete copy of the existing site?
Thanks
Dan
Hi Dan,
This is new feature in Umbraco 8. However, previous version of copy/paste language is still relevant and correct.
If let us say site templates on 2 languages are different then it is better to use complete copy of the existing site..
Alternatively, if templates are same and it is just language change then we should use new approach as it is much easier and has fallback feature too.
Hope this helps. Let me know if you have any other queries and I will try my best to assist.
Regards,
Shaishav
Sorry if i wasn't clear. We are using Variants BUT when i create a variant it is completely BLANK. It does not fallback to the original language for any fields that are not completed.
Hi Dan,
Thanks for the clarification. Please can you check if you have chosen below Fall back language for non default language as this is required.
Please check and advice.
Regards,
Shaishav
it is indeed...
Hi Dan,
Please can you try this one. I noticed you have "fr" as a parameter. I have tried locally without "fr" and it worked for me fine. It is falling back to default language.
Cheers, Shaishav
So although it looks like fallback is the default it is not...
https://github.com/umbraco/Umbraco-CMS/issues/4773
Hi Dan,
It was automatic for me. I am running v8.1.3
2 languages (English (default), Spanish (with fallback to english))
Added 2 domain for English and Spanish.
Created a field Menu Title with allow varying by culture.
Now, added value in 'Menu Title' in English and no value in Spanish.
When I tried to access Spanish page URL then got default Menu Title from English as Spanish was empty using below code.
Is it not working same way for you please?
Regards,
Shaishav
OK now, this makes sense. I had assumed that the fallback was automatic, i.e.
@Model.Value("menuTitle")
and not @Model.Value("menuTitle",fallback: Fallback.ToLanguage)
Hi Dan,
Great! We will need fallback property :)
Please can we mark this as solved. It will help others.
Regards,
Shaishav
Marked as the solution. I guess the reasoning behind it is there are multiple fallback options - https://our.umbraco.com/Documentation/Getting-Started/Design/Rendering-Content/#using-fall-back-methods
However, it would be good if a default fallback could be specified globally.
is working on a reply...