Hi,
in your documentation https://www.koolreport.com/docs/dashboard/language/ you say that to add some extra translations I have to add them in onCreated()
method of App
protected function onCreated()
{
$this->language(
VN::create()->extra([
"Anything"=>"Bất cứ thứ gì",
"amazing"=>"tuyệt vời",
])
);
}
also you say that to add a support of multiple languages I have to do this:
protected function languages()
{
// Return list of available languages for your users
return [
VN::create(),
EN::create(),
];
}
But this approach introduces an issue: the create()
method is executed twice, and on the second run, without any additional translations. As a result, all custom translations are lost.
If I keep only one
protected function languages()
{
// Return list of available languages for your users
return [
VN::create()->extra([
"Anything"=>"Bất cứ thứ gì",
"amazing"=>"tuyệt vời",
]),
EN::create(),
];
}
it works