What is the right way to localize the Messages of the Common Rules in Version 4.x ?
Are there any ready to use Languages (German, French etc.) ?
Thank for an answer !
CSLA is available with messages for a number of languages, for CSLA 4.3 these languages are included:
en, ar, bs, ca-ES, da, de, el, es-ES, es, fr, hr, hu, it, km-KH, nl, no, pt-br, pt, ro, ru, sr, sv, tr, vi, zh-CHS, zh-TW,
Thank you for your answer, but for me it don't work out of the box.
What must i Do, to use German translations of the Common Rules ?
Look on the Screenshot of my Test-Application:
It's a WPF-Application with Telerik Controls.
I have Set the Culture in the app.xaml.cs with this Statement:
public partial class App :
}protected override void OnStartup(StartupEventArgs e) base.OnStartup(e); FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
You must set Thread.CurrentThread.CurrentUICulture to the actual culture info.
My Problem was, that i doesn't had the resources (Csla.resources.dll) in the Culture Folders.
My Way (I Work with the Download from Csla, not Nuget-Packages)
- Extract the Source of Csla
- Open and Build the Csla Solution
- Found the Resources Files in ..\CSLA .NET\4.3.13\Source\CslaSource\Source\Csla\obj\Debug \culture (de, fr...)
- Copy the Csla.resources.dll into the Culture Folders of the Project
- The Setting of the CurrentUICulture was not neccessary
- But with my Play to set Different Cultures with Thread.CurrentThread.CurrentUICulture = new CulturInfo("de", false), it works with 'de', 'nl', 'fr' ad 'tr', but not with 'es' and 'it'
Copyright (c) Marimer LLC