Basically before implementing dynamic localization, I implemented
static localization service with somewhat that signature:

public interface ILocalizationService {
  void LocalizeEnumeration<TEnum>(out IDictionary<TEnum, string>
enumerationLocalizations);
  string Localize(ILanguage language, Type type, string labelCode);
  IDictionary<string,string> GetAllLocalizations(ILanguage, Type
type);
}

the use was for static message in my controllers and views.

being in hurry and with the need to translate some customer defined
reference data, the hackish solution was to call the existing
implementation such as:

localizer.Localize(aLanguage, typeof(Product),
String.Format("{0}.productname", aProduct.Key)

that's far from my "ideal" implementation (described in my message on
nhuser group) but it was enough for the project. It may scale if you
partition your label table and provide some views for easier
maintenance.

I'm still wanting to achieve "ideal" implementation.

On Sep 18, 8:26 pm, Mircea Jivoin <[EMAIL PROTECTED]> wrote:
> Thanks Segay.
> Have you been able to implement this?
> Can you share some code or examples?
> thanks
>
> On Sep 18, 2:15 pm, Gauthier Segay <[EMAIL PROTECTED]> wrote:
>
> > I asked similar question here:
>
> >http://groups.google.com/group/nhusers/browse_frm/thread/ea50487b27dc...
>
> > For the need of my project I put out a hackish localization scheme but
> > I may research on the topic later because this is a recurring need.
>
> > On Sep 18, 8:00 pm, Mircea Jivoin <[EMAIL PROTECTED]> wrote:
>
> > > Hi guys,
>
> > > I have to implement a multilingual application and I was wondering if
> > > you know of an example how to implement that.
>
> > > I'll have something like this:
> > > Product
> > > - Name
>
> > > ProductName
> > > - Product
> > > - Name
> > > - CultureId
>
> > > I was thinking of using the Formula in Product.Name property that will
> > > return an appropriate ProductName.Name for the current cultureid.
>
> > > Now how can I pass a parameter to the Formula?
> > > My formula would look something like this:
> > > SELECT ProductNames.Name FROM ProductNames WHERE
> > > ProductNames.ProductId=Id AND
> > > ProductNames.CultureId=:CultureFilter.CultureId
>
> > > I took this from Ayende's example. The problem is how do I
> > > EnableFilter and make sure is available during the session is active?
>
> > > Do you have any other ideas?
> > > MJ
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to