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

loading JSON translations #412

Closed
wants to merge 1 commit into from
Closed

Conversation

Eric-all
Copy link

@Eric-all Eric-all commented Nov 4, 2017

No description provided.

@nWidart
Copy link
Owner

nWidart commented Nov 7, 2017

Hello,

What does this do if there are no json files in the folder?

@Eric-all
Copy link
Author

Eric-all commented Nov 8, 2017

@nWidart look , laravel/framework#20599 😃

@nWidart
Copy link
Owner

nWidart commented Nov 8, 2017

Thanks, though this seems to be adding I/O operations. Don't you think it's easy for someone who wants json translations to add it?

Maybe it could be documented on the docs.

@@ -190,6 +190,7 @@ protected function registerTranslation()

if (is_dir($langPath)) {
$this->loadTranslationsFrom($langPath, $lowerName);
$this->loadJSONTranslationsFrom($langPath);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be loadJsonTranslationsFrom. JSON is not capitalized: Illuminate/Support/ServiceProvider.php#L107-L116

@nWidart
Copy link
Owner

nWidart commented Nov 19, 2017

Thank you for the contribution, but this is something that's easily added manually and avoids extra load.

@nWidart nWidart closed this Nov 19, 2017
@nWidart nWidart mentioned this pull request Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants