How to change text language in a widgets?

Hello! I am creating a streamlit application and using a language other than English in the interface. But some widgets like st.file_uploader have english description inside of it. Is there any way to change the text used by the widget?

Hi @Chrome1278,

There isn’t a built-in way to do this currently, but this would make a great feature enhancement request – feel free to submit one here

1 Like

You can circumvent not having that feature with a little css if you want:

[data-testid="stFileUploadDropzone"] div div::before {color:red; content:"This text replaces Drag and drop file here"}
[data-testid="stFileUploadDropzone"] div div span{display:none;}
[data-testid="stFileUploadDropzone"] div div::after {color:red; font-size: .8em; content:"This text replaces Limit 200MB per file"}
[data-testid="stFileUploadDropzone"] div div small{display:none;}

st.markdown(css, unsafe_allow_html=True)



This works, but the “Browse files” button still remains to be changed and the ‘display:none’ method won’t work since the whole button frame will disappear. Any ideas?

you can add
[data-testid="stFileUploadDropzone"] button{display:none;}
the button will be hidden , and it is works too 。