amiranagram / localizator

Scan your Laravel project and generate language files ready to translate in language(s) of choosing.
Other
229 stars 29 forks source link

JS Support #34

Closed rexlManu closed 2 years ago

rexlManu commented 2 years ago

Hey, I used this package also for inertiajs with the https://github.com/xiCO2k/laravel-vue-i18n package.

I added $t to the pattern and it works but the regex don't check for examples like this:

$t(
     'some random translatable message'
)

I adjusted the regex and asking if I should make pr with that, if you planned support for js?

amiranagram commented 2 years ago

Hi @rexlManu, when I wrote this package I planned to support custom functions (not only for PHP-Laravel), that's why I left the functions in config as customizable.

I will check out your PR though, and if everything is fine, I'll go ahead and merge. Thanks