I have added file_name in my translation files (with underscore) the problem is in this method :
vendor/backpack/langfilemanager/src/app/Services/LangFiles.php
public function getlangFiles()
{
$fileList = [];
foreach (scandir($this->getLangPath(), SCANDIR_SORT_DESCENDING) as $file) {
$fileName = str_replace('.php', '', $file);
if (! in_array($fileName, array_merge(['.', '..'], config('backpack.langfilemanager.language_ignore')))) {
$fileList[] = [
'name' => ucfirst(str_replace('_', ' ', $fileName)),
'url' => url(config('backpack.base.route_prefix', 'admin')."/language/texts/{$this->lang}/{$fileName}"),
'active' => $fileName == $this->file,
];
}
}
// Sort files by name for better readability
usort($fileList, function ($a, $b) {
return strnatcmp($a['name'], $b['name']);
});
return $fileList;
}
you remove underscore from the file name , and in the view
<a href="{{ route('language.showTexts', ['lang' => $currentLanguage, 'file' => strtolower($file['name'])]) }}">{{ $file['name'] }}</a>
the name will be correct but the file will not located correctly and will not appear the translation file in the view at then , should i make a pull request for this ?
I have added file_name in my translation files (with underscore) the problem is in this method : vendor/backpack/langfilemanager/src/app/Services/LangFiles.php
you remove underscore from the file name , and in the view
<a href="{{ route('language.showTexts', ['lang' => $currentLanguage, 'file' => strtolower($file['name'])]) }}">{{ $file['name'] }}</a>
the name will be correct but the file will not located correctly and will not appear the translation file in the view at then , should i make a pull request for this ?