i18nPlugin icon indicating copy to clipboard operation
i18nPlugin copied to clipboard

Suport for laravel translation directory

Open robov opened this issue 4 years ago • 3 comments

Would be awesome if it would support the laravel resources/lang directories that hold the php arrays for translations in their file/directory structure

robov avatar Dec 24 '20 14:12 robov

Hi Could you share a link to some project demonstrating the problem? Or create one? That would be very helpful: I'm not familiar with php arrays translations.

nyavro avatar Dec 24 '20 14:12 nyavro

Sure.. Laravel project stucture:

|...
| resources
  |.. lang
    |.. en
      |.. auth.php
      |.. validation.php
    |.. de
      |.. auth.php
      |.. validation.php

the auth and validation are the files that contain php arrays with the actual keys and translations However they could also be nested directories \en\module1\submodule\file.php

Or they could be json objects

php array:

'translation of key1' ]; These can also be multidimentional arrays Would be awesome to see support for this so I can see the actual translated text of the key in the ide Let me know what you need and how I can support

robov avatar Dec 24 '20 15:12 robov

Here is the pull request with demo project: https://github.com/nyavro/i18nPlugin/pull/91 Could you please contribute to it and provide possible cases of translations (php arrays, nested folders, jsons) and its usages?

nyavro avatar Dec 24 '20 16:12 nyavro