Home > front end >  User controll multilingual files inside multi-tenancy laravel application
User controll multilingual files inside multi-tenancy laravel application

Time:12-04

I have multi-tenancy application

and now I start adding multi language to this tenant ... but in my case

Every tenant can change the translated files that usually inside lang directory.

So how can I implement this changes without affecting other tenants?!

I want to make it dynamic all from tenant dashboard

CodePudding user response:

if you want to make it dynamic from the dashboard then you better store it in the database, and each tenant will have its own translations, otherwise, you can store each tenant in a separate folder like lang/en/{TENANT_ID}/file.php, then you can call it like:

__(getTenantId() . '.file.word');
  • Related