A
A
Antony2015-04-06 09:21:44
Machine translation from one language to another
Antony, 2015-04-06 09:21:44

How to properly organize the translatability of the text?

The question is, let's say I have text configs in a toy (as an example), with a description of items, for example:

{
   "type": "sword",
   "visible_name": "Sword of Uber Damage",
    "damage": 10000
   ...
}

{
   "type": "sword",
   "visible_name": "Player's tears",
   "damage": 1
   ...
}

The visible_name field is the name of the item that the player sees. What is the best way to make it translatable? Maybe I'm thinking in the wrong direction?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2015-04-06
@RiseOfDeath

In addition to a separate plugin with methods for generating messages in each individual language case, there are no universal methods.
Problems will begin, for example, when it will be necessary to join numerals or gender in different languages ​​- in some languages ​​it will be normal, in others it will be clumsy. The only way to make it perfect is to have different text generators for different languages.
And if you take into account the countries where the writing of texts goes from right to left, this is generally a pipe.
Briefly - ideal localization is not a resource, it is a separate subroutine with its own logic.
Different degrees of ideality of localization:

  • string file
  • file with strings and markers to replace (%1 %2 %3...)
  • separate UI plugin for each language

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question