-
Notifications
You must be signed in to change notification settings - Fork 321
Will not work for Indonesian translation #18
Comments
I don't see why this causes a problem. What is the error message you get? Please provide more info. |
@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 |
Ok, I will check this after the end of my holidays in 10 days. |
In the meantime use "ind" as iso. |
@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 For Indonesian I know that using Probably you it's ok to keep also |
I agree with taai. |
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! |
… model has a property named `en`. See #18
The changes were just released with the new version 4.0.0. I also created a method @taai and @sdebacker thanks for your feedback! |
It wont work simply because the Indonesian language code is
id
.The text was updated successfully, but these errors were encountered: