-
Notifications
You must be signed in to change notification settings - Fork 0
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
Features/add helpers #8
Conversation
b6750af
to
f108e39
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check at my comments below.
src/LocaleService.php
Outdated
} | ||
|
||
if (!isset($this->getLocalesAvailable()[$locale])) { | ||
return ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a better idea to fallback on the name
using getLocaleName
method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed
src/Blade/LanguageBladeExtension.php
Outdated
|
||
public function isLtr() | ||
{ | ||
return LaravelTranslation::getCurrentLocaleDirection() === "rtl"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use single quote notation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed
DIRECTORY_SEPARATOR . 'views'; | ||
} | ||
|
||
private function bootBladeExtensions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏 Separate nested foreach
in order to make the code readable and much clean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed
…e the current locale direction
…re already checking if the local exist
f358e56
to
fd9672f
Compare
Wait for #7 to be merged
Fix #5 and #6