tobytwigger / laravel-translate

Supercharged instant translations for any Laravel project.
https://tobytwigger.github.io/laravel-translate
MIT License
6 stars 9 forks source link

JS translation tool #3

Open tobytwigger opened 4 years ago

tobytwigger commented 4 years ago

To use the translations through javascript, it'd be great to call a function like translate(). This should call the _translate API to get a translation.

We could add a debouncer to save up translation calls and call the translate api with one request and multiple lines to translate. When it is called could be based on time, or if the url is getting too long