Internationalization, Localization and Globalization

Asked

Viewed 537 times

3

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

My biggest difficulty in this understanding, is that when searching for explanations, tutorials and examples, I always come across simple things, where I already have globalresources with files of Resource manual that already have the translated content. The same thing, was when I met the i18next, but I have to own the translation JSON of each page. But the content of my application is dynamic, coming from a database, which is powered by an administrative panel of the site user. How can I achieve internationalization of dynamic content? And the process is the same for Webforms and MVC?

  • 1

    To answer this question, I need to know how you write Labels of your Web Forms application. I don’t think it’s a good idea to do this in a database, because any and all requests will depend on a database and this can cause unnecessary overhead.

  • What would be the best idea then @Ciganomorrisonmendez? I have always made my webforms with Links or content literals, for example: On the "about the company" screen, I list the title, and description of the content that the user saved in the register. Can have titles such as: Mission, Vision, Company history, etc. And its due content.

  • 1

    I wanted a more concrete example. For example, in this answer I put a step by step using Resource files. In this case, you write your system using unacceptably contiguous strings, and fill the Resource file as you write the system. The advantage is to use editors like the Zeta Resource Editor for simultaneous translation.

  • 1

    Now, I don’t support the idea of everything being dynamic. The application will become too complex and error-prone, and it can happen that many parts are left without translation. In particular, I’ve never seen a 100% internationalizable fully dynamic system.

  • I understood, because the application is also dependent on the content that the user inserts, if it contains errors, it is not possible to have a legal translation. The x of the question is when my client wants what the content of his site is available in Portuguese and English, and how to make this dynamic translation of the content as it updates the application. And preferably without having to create two applications. I will read your response from the other post.

1 answer

2


I do not know if there is a solution ready that meets you and give you a really would be a very broad response. I can give you a solution in general terms, something I’ve already used in my solutions.

It can even take a certain amount of work but power and flexibility is hard work. The solution is to create your localization infrastructure (the correct term in this case).

Everyone is used to always having libraries and frameworks ready to solve everything. We use these solutions so much that sometimes we forget that someone had to do it. If you need something that doesn’t suit you, and it happens more often than it seems, you have two solutions: give up some requirement or create a solution of your own.

The solution itself doesn’t need to start from scratch, it can take advantage of something already existing to adapt.

You can create a collection of functions very similar to the one you have ready but the moment you pick up the strings required for each language the data source is changed. If Resources of Windows or of Java or in a JSON or XML file or flat file, now would be in a database. A very flexible library should even have facilities to exchange the data source in an almost transparent way.

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

A cache system is always welcome in such cases to avoid consulting the database every time.

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.