RTL is an abbreviation for “right to left” and is used to indicate languages that read from right to left vs. left to right. Certain CSS considerations can be made to properly display a page layout regardless of which direction a language reads. There are automated tools that can generate an RTL stylesheet from style.css.
- [Voiceover] Just as different countries…drive on different sides of the road,…so certain languages read right to left, or RTL,…versus left to right, or LTR.…While writing CSS styles that accommodate RTL languages…isn't technically a part of internationalization,…I wanted to bring it up,…because it's certainly relevant to the conversation…of making your software…as accessible to the masses as possible.…So what does it mean to support languages that read RTL?…Well, when displaying a page translated to an RTL language,…page layouts need to be shown in reverse.…
I'll show you an example of a website in the wild…that demonstrates this.…By clicking this toggle button,…everything on the page flips.…What was aligned left is now aligned right.…What was floated left is floated right, et cetera.…So this is regular left to right reading,…and if I toggle the direction,…that would be appropriate for a language…that reads right to left.…This is done by creating an RTL style sheet…that flips certain elements so they appear correctly…
- Why internationalization is important
- Using the gettext() function
- Adding context for translations
- Adding and loading text domains for WordPress themes and plugins
- Translating using GlotPress