hekmatinasser / verta

تبدیل تاریخ میلادی به شمسی برای لاراول و کار با تاریخ جلالی و اعتبارسنجی تاریخ
https://hekmatinasser.github.io/verta/
MIT License
596 stars 77 forks source link

Laravel custom larnguage file #165

Closed CyberMullah closed 6 months ago

CyberMullah commented 7 months ago

Based on https://github.com/hekmatinasser/jalali/issues/9 issue, I tried to set the message in the provider but it looks like the function setMessages isn't static.

So basically the target is to register the custom messages in AppServiceProvider so all object's messages should be based on registered local messages.


class AppServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        // Set messages of Verta
       Verta::setMessages('fa', ['months.12' => 'حوت']);
    }
}

But it throws the error, Non-static method Hekmatinasser\Jalali\Jalali::setMessages() cannot be called statically, would you provide an example how to do it in provider (globally).

Thanks

CyberMullah commented 7 months ago

https://github.com/hekmatinasser/jalali/pull/10

CyberMullah commented 6 months ago

Dear @hekmatinasser, any chance to have a look at this issue? Thanks

hekmatinasser commented 6 months ago

fix jalali 8.2.3 thank you @hamidafghan