andywer/laravel-js-localization

[Suggestion] Asterix to select all locales which is currently in use, and maybe a selector for all files with a filename in those locales

Closed this issue · 2 comments

I haven't tested this yet, as I just stumbled upon this package, and I'll start using it tomorrow.

Anyways, It'd be smart if I could just write locale: * to get all locales that I have in my resources/lang folder.

Eg. I want all locales of a single file, which might be called js-lang.php or something like that.

It would allow me to put the locales in there which I need in JS, but also have them in all locales in JS.

Do you get what I am trying to say? otherwise I will elaborate tomorrow :)

Hey! You should already be able to do so. Have a look at https://github.com/andywer/laravel-js-localization#configuration :

    /*
     * in short:
     * 'messages' => ['passwords']

You do not have to list all translation keys one by one. Since they are nested, you can simply specify a key that contains keys and all of these sub-keys and their sub-keys will be exported.

Alright, I'll check that out 👍