Wrong lang file when fallback language

Vote:
 

Hi!

When a page that don't exist in a specific language (in our case de-AT) all pages are set to fallback to de-DE. This works fine for the page properties, but we get "[Missing text /xxx/yy for de-AT]" statments all over the page (except for the texts translated to de-AT). Don't the resources get fallbacked as well to de-DE, or am I missing something?

Best regards, Jonas 

#36275
Jan 22, 2010 11:16
Vote:
 

No, it does not. (Examine EPiServer.Core.LanguageManager in Reflector for more details.)

But the mechanism to determine what language to show the content respectivly the user-interface language can be tweaked by overriding InitializeCulture() in your Page base class. You need to call UserInterfaceLanguage.Instance.SetCulture(lang).

It does unforunatly not solve the problem if you want fallback support and only provide an alternative translation foe few strings.

I suggest that you send a mail to the product manager (Roger Wirz) with a feature request.

 

#36279
Jan 22, 2010 12:14
Vote:
 

Thanks for your reply!

I've solved it by using: LanguageManager.Instance.Translate("/xxxxx/yyy", CurrentPage.LanguageBranch);

CurrentPage.LanguageBranch is set to the selected fallback language and therefore the correct resource is fetched.

#36283
Jan 22, 2010 13:54
Vote:
 

Call UserInterfaceLanguage.Instance.SetCulture(CurrentPage.LanguageBranch) during initialization and it will be done automatically for the whole user interface.

 

#36286
Jan 22, 2010 14:56
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.