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

[Bug]: Locale change isn't work #77

Open
sv-hmelevsky opened this issue Jan 14, 2025 · 1 comment
Open

[Bug]: Locale change isn't work #77

sv-hmelevsky opened this issue Jan 14, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@sv-hmelevsky
Copy link

What happened?

Changing locale in plugin doesn't work. The plugin does not take the default project locale. Also the plugin does not respond to language change. I tried to set the locale, but I get a warning that the locale is not found. However, the locale itself exists in the plugin files. I tried to connect cnd locale with an additional script, it didn't help.

How to reproduce the bug

Flatpickr::make('period')
    ->label('Range')
    ->dateFormat('Y-m')
    ->altFormat('F Y')
    ->altInput(true)
    ->static(true)
    ->default(now()->format('Y-m'))
    ->monthSelect()
    ->customConfig([
        'locale' => 'ru',
    ])

image

Package Version

3.1

PHP Version

8.2

Laravel Version

11

Which operating systems does with happen with?

Linux

Notes

There is absolutely no mention of how to set the locale for the plugin in principle. And what to do if my locale can change in the project? It turns out that I rigidly set the locale in the plugin parameters. To change the language I use BezhanSalleh\FilamentLanguageSwitch

@sv-hmelevsky sv-hmelevsky added the bug Something isn't working label Jan 14, 2025
@sv-hmelevsky
Copy link
Author

I was helped by this solution!
But I would like to have a parameter to set the locale from the developer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant