Closed hanc2006 closed 6 years ago
The cleanest solution I can think of is adding a new helper method where you could specify the domain like
_d($message, $domain, $args)
Which would take care of setting the domain for that exact string, then return to the previously set domain.
The other solution I see is to make LaravelGettext look for the string in all the domains, but this could lead to the wrong string found if they have the same key in different domains.
I would advise setting the domain directly in the Constructor of your controller, since usually you do different controllers for different business logic/domains.
How should laravel-getext be configured to generate many domains (=different files) and then be able to use them all together inside the application without change domain every time?
LaravelGettext::setDomain($domain);
In a situation where I have many translations it becomes difficult to have only one file in poedit for translate.