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

Add singleton usage #12

Merged
merged 5 commits into from
Jul 15, 2019
Merged

Add singleton usage #12

merged 5 commits into from
Jul 15, 2019

Conversation

abbadon1334
Copy link
Owner

For the ones who want to use it static. follow the example below :

TranslatorStatic::setTranslationsPath($this->path);
TranslatorStatic::setLanguagePrimary('it');
TranslatorStatic::setLanguageFallback('en');
TranslatorStatic::addLanguage('ro');
TranslatorStatic::register();

__('friend'); // now you can call __ which internally calls => TranslatorStatic::_

@abbadon1334 abbadon1334 merged commit abdd335 into master Jul 15, 2019
@abbadon1334 abbadon1334 deleted the add-singleton-usage branch July 15, 2019 08:47
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.

1 participant