Internationalization of YAML

I work in a big project. I am thinking of a new idea to create a better way to internationalize in many languages.

Solutions:

  • 1. Store data as arrays - the file system of the tree. This is not a good way, because I need to modify the files on the air.
  • 2.I18n table. All translations have a common table or relative tables. (Database queries + database cache)
  • 3.YAML (this is new to me)

I read about the YAMl documentation and I like this structure. I suggest a third solution. I would like to hear your opinions / suggestions.
Thank you in advance.

+3
source share
1 answer

OK, I have no answers.
I will describe here my localization solutions

.
( ):

: common.en_US.yaml

menu:
  clients: Clients
  other: Other
  management: Management

:

l10n::get('menu/clients');

javaScript- yaml.


java script yaml localization :
l10n.
_l10n

l10n::get_data('table',68);
+4

Source: https://habr.com/ru/post/1688511/


All Articles