Can I change language code <html lang=β€œen”> to other?

This question was already asked but with no answer .

My app deploys as an english app and user brower partialy translates some words to french giving funny results

How to I set lang to french ?.

1 Like

Hi @Boubil_Nat

To work with HTML codes, you’ll need to activate unsafe_allow_html=True parameter in st.markdown.

As for translation, it seems to be a browser translation. Other options could be actual translation of the underlying text. Or the use of a language translation library that translates text used in-app.

Then lang attribute has to be set on the tag which cannot be done with st.markdown .

Hi @Boubil_Nat

Perhaps you can look into CSS customization which uses st.markdown().

input_css = """
... css code goes here ...
"""
st.markdown(f'<style>{input_css}</style>', unsafe_allow_html=True)