Load messages from json
Closed this issue · 3 comments
Hey guys.
Is There an option the load the messages from a remote json?
Hello @dyegonery!
Could you provide more info what are you trying to do? Isn't setMessages
method not enough?
hey @a-komarev I did not expressed myself well. So, what I was trying to say is the possibility of loading messages from a remote json file. Because, it would be nice to organize the messages in differentes files, and then load the messages from this files, exactly like in Laravel translation.
As I remember @rtheunissen raised this question earlier in this repository or in https://github.com/rmariuzzo/Laravel-JS-Localization. But as far as I know there is no possibility to do so right now.
You could bypass previously fetched messages to Lang
object using setMessages
method, but there are no solution out of the box. But if you wish to use multiple translation files at one page - there you will require to write new method like appendMessages
. And you need to rewrite generator logic.