Internationalization, Localization and Globalization

3

I have a project that needs to work with internationalization, where the web application needs to be available in at least Portuguese and English , and perhaps also in Spanish.

My biggest difficulty with this understanding is that when I search through explanations, tutorials and examples, I always come up with simple things, where I already have globalresources with manual resource files that already have the translated content. The same thing happened when I met the i18next , however I have to have the JSON of the translation of each page. But the content of my application is dynamic, coming from a database, which is fed by a user administrative panel of the site. How can I achieve internationalization of dynamic content? And the process is the same for WebForms and MVC?

    
asked by anonymous 23.01.2015 / 12:56

1 answer

2

I do not know if there is a ready solution that meets and gives you one really would be a very broad answer. I can give you a solution in general terms, something that I have used in my solutions.

It may even work, but power and flexibility work. The solution is to create your localization infrastructure (the correct term in this case).

Everyone is accustomed to always having libraries and ready-made frameworks that solve everything. We use these solutions so much that sometimes we forget that someone had to do that. If you need something that does not meet you, and this happens more often than not, you have two solutions: give up some requirement or create a solution of your own.

The solution itself does not need to start from scratch, you can take advantage of something already in place to adapt.

You can create a collection of functions very similar to what you have ready, but the moment you pick up the strings required for each language, the data source is changed. If you were in resources of Windows or Java either in JSON or XML file or flat file , would now be in a database. A very flexible library should even be able to swap the data source almost transparently.

In theory, it does not matter where you are using it. Good localization technology should be able to be used under any circumstances.

A cache system is always welcome in cases like this to avoid querying the database every time.

If you want to have an external data source, if you want to allow its exchange you need to create the appropriate infrastructure for this. I gave you the solution to what you asked for. If you can do it otherwise, without external data, do it.

    
23.01.2015 / 13:12