Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate each language folder #120

Open
AliN11 opened this issue Dec 13, 2017 · 4 comments
Open

Separate each language folder #120

AliN11 opened this issue Dec 13, 2017 · 4 comments

Comments

@AliN11
Copy link

AliN11 commented Dec 13, 2017

I think it is not possible to separate each language folder.
For example I don't need Italian language while default locate is set to English.
It could be a big issue if we have many languages and files.

I expect each language folder to be generated in separate file (not all languages in one file). something like this after generation:

en.js
fr.js
it.js
...
@rmariuzzo
Copy link
Owner

This sound like an interesting improvement for this library. Currently, we generate everything in one single file (unfortunately).

BTW, @AliN11 are you using webpack? If yes, check this: https://github.com/rmariuzzo/laravel-localization-loader/ it may help for you specific case. Otherwise, I will think of a solution for your particular case.

@AliN11
Copy link
Author

AliN11 commented Dec 14, 2017

Yes I am using Webpack but didn't try given repository 😉.
It would be great if you do something like this in config file:


return [
    'desired/path/for/english' => [
        'en/validation',
        'en/auth',
        'en/customers/profile',
        'en/somthingelse',
    ],
    'it' => [
        'it/validation',
        'it/auth',
    ],
];

@kingvish
Copy link

Another feature or complexity can be like I want to use this with modular project build with https://github.com/nWidart/laravel-modules, There is separate translation folder for each module.

@ghost
Copy link

ghost commented Jul 2, 2018

I think this will definitely be a nice addition, it would bring further consistency with the Laravel Localization API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants