nyavro / i18nPlugin

Intellij idea i18next support plugin
MIT License
72 stars 12 forks source link

Suport for laravel translation directory #90

Open robov opened 3 years ago

robov commented 3 years ago

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

nyavro commented 3 years ago

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.

robov commented 3 years ago

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: <?php return [ 'key1' => '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

nyavro commented 3 years ago

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?