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

Dynamically add languages #160

Closed
atefrihane opened this issue Jul 21, 2020 · 2 comments
Closed

Dynamically add languages #160

atefrihane opened this issue Jul 21, 2020 · 2 comments
Assignees

Comments

@atefrihane
Copy link

Hey everyone

I would like to know is there a way to dynamically add languages within this package ?

I tried to use Laravel Config::set() but changes are not persistent!

Anyone can help me ?

@Gummibeer
Copy link
Member

Hey,

The package comes with its own Locales service class. If you've changed the config you will have to call load() on it to let the package know about it.
If you only want to add (not remove) locales I would recommend to use the add() method of named service. Keep in mind that this locales class is the one and only source of truth for this package (on runtime). So if you need the list of locales somewhere else you should use this class - otherwise your lists could differ which could result in undefined locale exceptions.

@Gummibeer Gummibeer self-assigned this Jul 21, 2020
@stale
Copy link

stale bot commented Aug 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants