Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Will not work for Indonesian translation #18
@dimsav I didn't even test it. Code is very readable, so I red it.
<?php $country = Country::where('iso', '=', 'id')->first(); echo $country->id->name; // Will throw an error (probably)
I believe that the error will be about that I'm trying to get
@dimsav I have never made an app with Indonesian language in use. I'm just saying that this is a potential problem.
$country = Country::where('iso', '=', 'gr')->first(); echo $country->getTranslation('en')->name; // Greece App::setLocale('en'); echo $country->name; // Greece App::setLocale('de'); echo $country->name; // Griechenland
I know that using
Probably you it's ok to keep also
Alright, so I will update the documentation in the readme file and promote getTranslation() instead of $country->en->name. I wonder if it would be a good idea to deprecate it in a future version.
Update: The syntax
Thanks for the notice!