About
The lang attributes is a styling attribute that sets the language of a text.
If you want to set the language for:
- one page: use the lang page configuration
- the whole website, use the lang application configuration
Example
English and Arabic on the same page.
<text lang="en">This text is in English and goes from ''Left To Write''</text>
<text lang="ar">بينما هذا النص عربي وينتقل من اليمين إلى اليسار</text>
This text is in English and goes from Left To Write
بينما هذا النص عربي وينتقل من اليمين إلى اليسار
Syntax
<component lang="languagevalue" />
where the language value is the two letters language. You can find it as the subtag in the official iana list
You can set it in a block as well as a inline component.
This attribute will also set the direction of the text to:
- Right to Left
- Or Left to Right