rob-balfre / svelte-select

Svelte Select. A select component for Svelte
https://svelte-select-examples.vercel.app
Other
1.27k stars 180 forks source link

Empty State ('No Options') cannot be translated #627

Closed steppenwolfXYZ closed 11 months ago

steppenwolfXYZ commented 1 year ago

When the select has no options and the hideEmptyState option is set to false, the text 'No Options' is shown. This text is hard coded and cannot be translated.

Would be very nice to have this text as parameter so the plugin works for other languages than english.

My workaround so far: Find the element in an interval and replace text if it is there. Any better suggestions?

rob-balfre commented 1 year ago

Yeah. Use the slot....

https://svelte-select-examples.vercel.app/examples/slots/empty

On Fri, 1 Sept 2023, 2:56 am Georg Brodbeck, @.***> wrote:

When the select has no options and the hideEmptyState option is set to false, the text 'No Options' is shown. This text is hard coded and cannot be translated.

Would be very nice to have this text as parameter so the plugin works for other languages than english.

My workaround so far: Find the element in an interval and replace text if it is there. Any better suggestions?

— Reply to this email directly, view it on GitHub https://github.com/rob-balfre/svelte-select/issues/627, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUAM7SKTCOSQB2NMCHEHUTXYC633ANCNFSM6AAAAAA4GLY7W4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

steppenwolfXYZ commented 11 months ago

Perfect, thanks a lot, solved my problem.