.NET Development
Usage of West Wind Globalization trough multiple layers of application
Gravatar is a globally recognized avatar based on your email address. Usage of West Wind Globalization trough multiple layers of application
  nikola
  All
  Nov 16, 2017 @ 06:31am

Hi

I've been using West Wind Globalization trough multiple projects and it was perfect. But now I have a problem, my new project has 3 layers (public, services, private). So to show translated language from database that is in the private layer, I need to connect it all to public layer trough services. I have no idea how to set this up. Is it even possibe for this library to work on multiple layers.

Gravatar is a globally recognized avatar based on your email address. re: Usage of West Wind Globalization trough multiple layers of application
  Rick Strahl
  nikola
  Nov 16, 2017 @ 11:51am

I'm not sure what you mean when you talk about the 'private layer'. What does that mean in this context?

If you use database localization, you will obviously need access to the database or a service that exposes resources to you in some way.

However, you always have the option of exporting resources to Resx resources that can be statically compiled into your 'private layer' so there's no runtime dependency. You lose the ability to edit/update those resources dynamically but it does break the coupling to the database.

Generally - I think of resources for the application layer are a good fit for Westwind.Globalization and running directly from the database - especially if you want to dynamically edit the resources.

For components or reusable code (class libraries etc.) I generally recommend you don't use dynamic localization but rather use RESX resources that are exported and bound statically. I'm not sure if your 'private layer' fits that description but either way that is an option.

+++ Rick ---

© 1996-2024