A3-Antistasi icon indicating copy to clipboard operation
A3-Antistasi copied to clipboard

Initial localization support

Open Jonathan-Rosewood opened this issue 6 years ago • 4 comments

These changes were made to start collecting information about possible problems with the ArmA localization system.

Jonathan-Rosewood avatar Nov 14 '18 20:11 Jonathan-Rosewood

Question, the system accepts dynamic text? Reason: I have seen text with "Maru" and it should change to "Petros" depending on the edition. That may happen in several situations.

Barbolani77 avatar Nov 23 '18 10:11 Barbolani77

@Barbolani77 sure. Look at this rows:

  • https://github.com/A3Antistasi/A3-Antistasi/pull/205/commits/f9fc32a7efd3899e7326949dcf27b97dec7391e8#diff-178af09c265f286c45891bc0cf89d1bdR100
  • https://github.com/A3Antistasi/A3-Antistasi/commit/f9fc32a7efd3899e7326949dcf27b97dec7391e8#diff-73fc5dc817fea26a79a7ac58e09aae37R12

Jonathan-Rosewood avatar Nov 24 '18 08:11 Jonathan-Rosewood

You can do nested formatting. For example, we have the strings - "Hello my name is Maru" and "Greetings from Maru". Where the name may be one of several options that must also be translated into other languages. For example, such as - "Maru" and "Petros". To do this, we make the main lines with a name marker - "Hello my name is %1" and "Greetings from %1". And separate translation lines for names - "Maru" and "Petros". When using, we format the main string by substituting the translated name as an argument.

hint format [ localize "str_antistasi_greetings", localize "str_antistasi_name_maru" ];
// Result if locale is English: hint format [ "Greetings from %1", "Maru" ];
// Result if locale is Russian: hint format [ "Приветствие от %1", "Мару" ];

Jonathan-Rosewood avatar Nov 24 '18 08:11 Jonathan-Rosewood

ok, will start to work with this structure

Barbolani77 avatar Nov 26 '18 11:11 Barbolani77