A
A
AJ2012-11-28 21:24:13
PHP
AJ, 2012-11-28 21:24:13

Where to read about the development of multilingual systems?

Good habralyudi.
As part of the development of an international project, I thought about multilingualism and the method of implementation. Of course, I saw solutions from the outside. I worked with them a little, but as an editor.
The principle is quite simple. Language file, integrator script, js georeference script. However, I would like to read in detail to avoid bicycles and pitfalls.
Thanks in advance for your replies.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Mike Grigorieff, 2012-11-28
@Grigorieff

What is the development going on? PHP, Rails? For Rails, for example, use the built-in class i18n

S
Sergey, 2012-11-28
Protko @Fesor

Well, as it were, there are many approaches. i18n is in all normal frameworks, translation of content can be organized by linked tables with locale. JS is usually done using some kind of templates, which can also be replaced depending on the locale or replace part of them, you can also use libraries for internationalization for JS (fortunately, there are several good ones). In general, I did not see any general case, because all cases are different and require their own approach.

N
Nazar Mokrinsky, 2012-11-29
@nazarpc

I implemented it like this:

$L->some_phrase;                           //Строка перевода, если перевод отсутствует - возвращается "Some phrase"
$L->mail_body($site_name, $username);      //Так работают переводы, которые требуют подстановки пользовательских данных, сама строка перевода в формате функции printf(), конкретно тут используется vsprintf()

$L is an object that, when created or calling the language change method, loads translations from the JSON file. It is also possible to use closures instead of string substitutions (for example, when time is displayed and you need to change the end of a word). Calls to non-existent properties and methods are caught using __get() and __call().
If you are interested in how it works in practice - write in a personal, I'll show you.

A
Andrey Shiryaev, 2012-11-29
@Claud

I think you should take on gettext, because. in addition to all the necessary features, he also has ready-made software, including for translators. At one time I also looked for different solutions, but I did not find anything suitable. There are standards, for example: something from microsoft in xml (I don’t remember the name), but gettext is still faster and there is an infrastructure.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question