kenepa / translation-manager

Manage your application's translations in Filament.
MIT License
92 stars 29 forks source link

Text instead of flag for language switcher #33

Closed bilogic closed 11 months ago

bilogic commented 11 months ago

Is there an option use only text for the language switcher? Flags are not entirely representative and it can also refer to currencies on some websites, leading to confusion.

Jehizkia commented 11 months ago

In the config/translation-manager.php, you'll need to set the option 'show_flags' to false to disable the flags.


/*
    |--------------------------------------------------------------------------
    | Flags or Initials
    |--------------------------------------------------------------------------
    |
    | Control whether to express locales using international flags, or through locale initial letters if disabled in the language switcher.
    |
    */

    'show_flags' => false,
bilogic commented 11 months ago

I noticed that text version does not indicate the current language, small issue though. Thanks!

cawecoy commented 11 months ago

Also, I need to define custom text for each language, in my case it would be: EN, PL, CZ, etc. Thanks for the awesome work in this plugin!

rgut13rrez commented 3 weeks ago

@Jehizkia sorry for the ping. If the flag option is set to false, how can we display the initial letters instead? When I disable the flags all I see now is a black circle.

Jehizkia commented 3 weeks ago

@rgut13rrez It should not show a black circle; it should show a translation logo like this: Screenshot 2024-11-07 at 09 11 57

Which version of the package and filament are you running ? Could you please provide a screenshot?

About your question: would you like to display the initial letters in place of where the flag is displayed?

rgut13rrez commented 3 weeks ago

@Jehizkia This is what I am seeing:

Screenshot 2024-11-07 at 09 14 45

I am on 4.0.12

And yes, I would like to display the initial letters where the flag is displayed.

Also, the issue appears to be a background color being set on the div: bg-[#030712]

Screenshot 2024-11-07 at 09 23 39

Thanks

rgut13rrez commented 3 weeks ago

I think I narrowed it down to one thing. I went ahead and added it to my users panel and it was displaying fine, but then I forgot I had not added the required line ('./vendor/kenepa/translation-manager/resources/*/.blade.php',) to the tailwind.config.js file, and when I added it and ran the build the black background was added.