tobytwigger / laravel-translate

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

Avoid to save translations in database #36

Open jloguercio opened 2 years ago

jloguercio commented 2 years ago

Is possible to avoid to save the translation to database?.

Im planning to use the Database table for a different purpose i mean, using the normal traduction to translate a template (using the @trans directive) and the laravelTranslate function only for a translation service (but without save the translations in the database)

There is a way to pass a parameter to avoid save the translations in the laravelTranslate function or something like that?

im using AWS.

Thanks

hiteshsamcom commented 2 years ago

Hi @jloguercio

If you want to take out any of the steps, you can call the relevant function in the register function in your AppServiceProvider

\Twigger\Translate\TranslationServiceProvider::withoutCache(); // Don't use the cache
\Twigger\Translate\TranslationServiceProvider::withoutDatabaseOverrides(); // Don't look for translations in the database
\Twigger\Translate\TranslationServiceProvider::withoutLangFiles(); // Don't load any language files