Disable new translations? #18
-
|
Hi, Is it possible to disable the translator when the .env configuration is not set?
Is this something that is already possible? Thanks for this wonderful library. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @sitenzo, Thank you for reaching out and for your kind words about the package! Based on the scenario you described, where you want to disable the translator in production by removing the AWS keys, there's a straightforward solution that aligns with your requirements. You can modify the AWS configuration used by the AWS Service Provider for Laravel as documented in their Configuration section. By publishing the For your specific case, you can update the credentials configuration in the 'credentials' => [
'key' => env('AWS_ACCESS_KEY_ID', ''),
'secret' => env('AWS_SECRET_ACCESS_KEY', ''),
],To simply: 'credentials' => false,This change will instruct the AWS SDK not to attempt any translation when the credentials are explicitly set to false. Consequently, the translator will not throw any Furthermore, to implement the logging functionality you mentioned — logging untranslated texts for later review — you can create a custom |
Beta Was this translation helpful? Give feedback.
Hi @sitenzo,
Thank you for reaching out and for your kind words about the package!
Based on the scenario you described, where you want to disable the translator in production by removing the AWS keys, there's a straightforward solution that aligns with your requirements.
You can modify the AWS configuration used by the AWS Service Provider for Laravel as documented in their Configuration section. By publishing the
aws.phpconfig file to your Laravel application, you gain the ability to customize the AWS SDK's behavior based on your environment.For your specific case, you can update the credentials configuration in the
config/aws.phpfile from this: