Menu

I added 5 languages and Arabic RTL to a React + Tailwind landing page. Here is what I learned
📰

I added 5 languages and Arabic RTL to a React + Tailwind landing page. Here is what I learned

DEV Community: react·Muhammad Abdullah·14 days ago
#4CgW4RlI
#devtoreact#devto#dev#translation#enter
Reading 0:00
15s threshold

I recently built a SaaS landing page template with React, Vite and Tailwind CSS, and I wanted it to work in English, German, French, Chinese and Arabic . Arabic was the interesting one, because it needs a right-to-left (RTL) layout, not just translated text.

This post covers the setup I ended up with and the mistakes I made along the way. I am still learning, so if you know a better way to do any of this, please tell me in the comments.

You can try the result here: live demo

The stack

React + Vite

Tailwind CSS (v3.3 or newer, because of logical properties)

i18next , react-i18next , i18next-browser-languagedetector

npm install i18next react-i18next i18next-browser-languagedetector

Enter fullscreen mode

Exit fullscreen mode

1.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.