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

Adding a language parameter in f7SmartSelector #238

Open
dtamien opened this issue Feb 9, 2023 · 1 comment
Open

Adding a language parameter in f7SmartSelector #238

dtamien opened this issue Feb 9, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@dtamien
Copy link

dtamien commented Feb 9, 2023

Hello !

Thank you very much for providing this package. I'm using it to develop a web app in order to help people in need.

I'd like to be able to change "Search" for "Rechercher" (French).

Could you please let us do that by adding a parameter such as languagein the f7SmartSelector options? It would be great If we could aslo do that for the "Close" text. I'd set it to "Fermer".

image

@DivadNojnarg DivadNojnarg added the enhancement New feature or request label Jan 17, 2024
@DivadNojnarg
Copy link
Member

All the language options can be controlled from the framework7 documentation: https://framework7.io/docs/smart-select#smart-select-parameters. This could give:

f7SmartSelect(
         inputId = "variable",
         label = "Selectioner une variable:",
         selected = "drat",
         choices = colnames(mtcars)[-1],
         openIn = "popup",
         popupCloseLinkText = "Fermer",
         searchbarPlaceholder = "Chercher"
       )

Unfortunately, searchbarPlaceholder would have to be revisited. It is initialised here which basically overwrites any user change:

config <- dropNulls(list(openIn = type, searchbar = searchbar, 
        searchbarPlaceholder = "Search", virtualList = virtualList, 
        ...))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants