mathishuettl's avatar

Multiple lang-files: laravel-vue-i18n-generator

Hello,

I just implemented this package: https://github.com/martinlindhe/laravel-vue-i18n-generator to add translations into my vue components.

I use multiple language-files: resources/lang/de/welcome.php and resources/lang/en/welcome.php so when I use

{{ $t("welcome.test") }}

In my vue-component only "text.test" is rendered. How to get the text from my language-file?

0 likes
1 reply
piljac1's avatar

I would suggest choosing another package because it's not longer maintained. I went with Laravel JS Localization, which implements Lang.js (both are maintained by the same person). It is not bound specifically to Vue, so you can use Lang.js in any JS frameworks and vanilla JS.

1 like

Please or to participate in this conversation.