Gettext (gettext-commons) or stick with java i18n

We are currently on our platform. The code base for the platform and the product built on this platform is huge and has many hard-coded strings (except for the interface where we externalized shortcuts, etc.).

I need suggestions for using gettext or Java i18n. I am only limiting my understanding of the benefits and understanding of gettext. What will gettext provide besides Java i18n already provided?

Thanks in advance.

+3
source share
1 answer

For me, the main reason (from Gettext Commons Tutorial ):

I18n :

System.out.println(i18n.trn("Copied file.", "Copied files.", 1));
// will print "Copied file."

System.out.println(i18n.trn("Copied file.", "Copied files.", 4));
// will print "Copied files."

. , " ". , , ( ).

, (, ), , ( , , ).

, , : Gettext Commons Apache 2.0, Gnu gettext ( , ), GPL ( L-GPL, Linux). , , , Linux-, .

+4

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


All Articles