xiCO2k / laravel-vue-i18n

Allows to connect your `Laravel` Framework translation files with `Vue`.
MIT License
621 stars 51 forks source link

Ability to use a folder with language files instead of 1 file #17

Closed MeesPos closed 2 years ago

MeesPos commented 2 years ago

Is it possible to create a folder for a language, and that you can put multiple translation files in it?

xiCO2k commented 2 years ago

Hey @MeesPos, if you have something like that on a .json file on Laravel it will work? If so we can add that as new feature.

Thanks.

MeesPos commented 2 years ago

Yes, here is an example:

image

This is what you get when you init Laravel in your project.

Now you can get a translation with the following code: __('auth.test').

xiCO2k commented 2 years ago

Yes with the php files, that is a feature needed to implement, to add a loader to transform the .php lang files to .json to be readable from the frontend.

But for the .json lang files I'm not sure if the multi level is supported (never tried).