martinlindhe / laravel-vue-i18n-generator

Generates a vue-i18n compatible include file from your Laravel translations
MIT License
306 stars 207 forks source link

Empty i18n arrays in created vue-i18n-locales.generated.js file #15

Closed simtrax closed 7 years ago

simtrax commented 7 years ago

The package does not fetch the translations as I expected it to. Is the i18n arrays supposed to be empty like this? "i18n": { "ro_RO": { "LC_MESSAGES": [] }, "sv_SE": { "LC_MESSAGES": [] } } I have two languages where I have translations from sv_SE to ro_RO. All the other out of the box Laravel specific validation messages are working.

martinlindhe commented 7 years ago

Hello! How does your laravel translation file look? I am curious what LC_MESSAGES is doing here. It usually is the name of a system envoronment variable that controls the language of text in your Linux shell.

simtrax commented 7 years ago

I've used laravel-gettext to genereate translations for the site. Using blade to translate strings in my views based on the locale setting of the app. With the help of that package. Now I'd like to translate strings in my vue components, hoping that this package could help me out. But I could've gotten everything wrong. I can imagine it's kind of tricky, cause I'd like Vue to get it's translations from the laravel-gettext package. Am I on the right track? Otherwise I'll have to keep searching. I'll paste an image of my Laravel lang folder. skarmavbild 2017-05-06 kl 09 14 37

martinlindhe commented 7 years ago

Okay. This program reads the laravel translation json files, and is not compatible wirh .po and .mo files from laravel-gettext.

martinlindhe commented 7 years ago

s/json files/php arrays/