andywer / laravel-js-localization

Simple, ease-to-use and flexible package for the Laravel web framework. Allows you to use localized messages of the Laravel webapp (see `resources/lang` directory) in your Javascript code.
MIT License
143 stars 51 forks source link

[feature] default language keys when missing in a split_export_files #60

Open Cyrille37 opened 5 years ago

Cyrille37 commented 5 years ago

Hi and thanks a lot for this great and useful package.

It could be nice to have an option that make generation of split_export_files merging default language keys when they are missing in a language file.

For example with those languages keys in resources/langs :

we could navigate in language "fr" and displaying the "en [default]" value in place of the key path.

Also it make Javascript translation works like the Php Laravel side with a default language value when a language missing a key.

I Hope to be clear enough ... I'm not sure :-)

andywer commented 5 years ago

Interesting point. Thanks for sharing, @Cyrille37!

Anyone else have an opinion on that?

ackalhan commented 5 years ago

I'am glad using this package, And we also finding a solution for this in our project. Really appreciate if you guys can add this ASAP. Thanks

andywer commented 5 years ago

This package is not under active development anymore, at least not by me.

Feel free to submit a PR implementing the feature you need, though. I will handle the PR, we just need some community work here 😉

ackalhan commented 5 years ago

@andywer made a pull with a change check that out thanks. https://github.com/andywer/laravel-js-localization/pull/62