Menu

Post image 1
Post image 2
1 / 2
0

Bilingual FR/EN blog in pure PHP: architecture without framework or database

DEV Community·Odilon HUGONNOT·21 days ago
#Txz6Jd1T
#layer#language#php#i18n#fullscreen#slug
Reading 0:00
15s threshold

This blog was built in pure PHP, no CMS, no database. First article in the series , already published. At some point the question comes up: is it worth adding English support? Short answer: yes, and it's less complicated than it looks. Long answer: here's how I did it, with the traps that come with it. No gettext , no i18n library, no database for translations. Just separate PHP files per language, a restructured JSON file, and three layers of routing. The whole thing fits in a few dozen lines of code spread across files you already have. Why translate a developer blog Two concrete reasons, no philosophy. The English-speaking SEO market is 10 to 50 times larger. A query like "php blog without framework" has a search volume that has nothing to do with the French equivalent.…

Continue reading — create a free account

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

Read More