How to split a message file into several files in playback mode 2.0

I have a huge message file that I need to split into several files in different languages. For instance:

I created one folder for the English language ie en and another for the French locale, fr inside the conf folder. en contains messages1_en.properties and messages2_en.properties fr contains messages1_fr.properties and messages2_fr.properties

How to access these property files inside my view.

thanks

+6
source share
1 answer

The only way to do this without introducing your own alternative implementation and not use inline messages is to use hacked locales, so you should do fr_type1, fr_type2 or something similar to choose the suitable alternative.

This is probably a bad idea, since it is always risky to use the API in a different way than it was intended to be used, there is a high risk of unexpected behavior, and it can be fragile, because there is no guarantee that you can use the locales made in future versions, etc. .d.

If you look at the implementation of messages, you can probably get some ideas on how to implement your own without much trouble.

Good luck

0
source

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


All Articles