laravel-langman icon indicating copy to clipboard operation
laravel-langman copied to clipboard

Lang files in sub-directories of the app not handled (non-vendor)

Open prageeth opened this issue 5 years ago • 1 comments

  • Laravel Version: 5.8.0
  • PHP Version: 7.2.0
  • Database Driver & Version: mysql

Description:

Language files under sub-directories are not taken into consideration.

e.g.:

/en
   /menu
       menu.php

The above is valid and can be accessed using __('menu/nav.some-key').

However, this package doesn't recognise them.

Steps to reproduce:

Add a language file in the file structure above (with some keys).

Then run php artisan langman:show menu/nav

Excepted Result See the keys and their translations

Actual Result No keys are shown

prageeth avatar Jun 28 '19 21:06 prageeth

Hey @prageeth .

Don't know if you get this solved, but I tried your setup and for me it worked when I just run php artisan langman:show menu instead of php artisan langman:show menu/menu. So seems like you don't have to put in the whole path.

The only problem is, if you have two files that are named the same, so if you have /en/menu.php and /en/menu/menu.php. The command langman:show will pick the first one.

lauhakari avatar Jun 05 '20 12:06 lauhakari