Manuals
RU EN

Products · 86

Multilingual PHP script website

Products 6 min read

A multilingual website on a PHP script serves content in several languages with separate URLs. White-label platforms, corporate sites with audiences in different countries, and geo-targeted landing pages need this. A Google Translate widget in the corner is not enough: search engines and people need proper addresses, translated entities, and consistent hreflang.

Related flow: white label, turnkey website, corporate site, landing page.

URL approaches

  • Prefix: /ru/..., /en/... - the most common and understandable option.
  • Subdomains: en.example.com - flexible, but harder for cookies and certificates.
  • Separate domains - for strong country brands, more expensive to maintain.

Choose one approach before launch. Changing URL scheme after indexing means months of redirects. A ?lang=en parameter is usually worse for SEO than a prefix.

What to translate

Interface elements such as buttons, errors, and emails; content entities such as services, cards, and news; meta tags; legal pages. An untranslated account area behind a "multilingual" landing page breaks expectations. Conversely, translated UI with placeholder content also looks raw: roll languages out in stages, but honestly mark availability.

In the database, translation tables or per-language JSON fields can work depending on the product. The important part is not to copy the whole entity row without a link to the original; otherwise you will not be able to find "the same news item in en".

hreflang and canonical

For each language version, specify mutual hreflang and x-default according to your policy. Canonical should point to itself, not blindly to the "main language". hreflang mistakes do not explode the site, but they hurt international snippets. Check after adding a language, not once a year.

The sitemap can be one file with language URLs or several language-specific sitemaps. Completeness and no dead links matter most.

Language switcher

The switcher should lead to the equivalent page, not always to the home page. If a translation does not exist, use an honest fallback: a "translation unavailable" placeholder or redirect to the default language with a clear message. A silent redirect from a deep page to the English home page is frustrating.

Remember the choice in a cookie. Do not break full-page cache with unnecessary HTML personalization.

SEO content by language

Unedited machine translation is dangerous for commercial pages. Legal texts require human translation. For a blog, MT draft plus editing can be acceptable. Catch same-language duplicates on two URLs immediately.

Date, currency, and phone formats are part of "language". en-US and en-GB may differ; do not complicate this until there is demand.

Account area and emails

The account language follows the user's selection or account setting. Emails are sent in the user's language, not the language of the admin who clicked the button. Email templates for every language should be editable in the admin panel, with fallback to the default.

Acceptance checklist

  1. Home page and one deep page open on every language through friendly URLs.
  2. The switcher leads to the equivalent page.
  3. hreflang is checked with a validator or viewer.
  4. Form and email work correctly in the second language.
  5. No mixed languages in one template on delivered pages.
  6. Sitemap includes language URLs.

Translation process in the team

Assign an owner for each language: who approves wording, who loads it into the admin panel, who checks layout. Long German words break buttons. Translation statuses for an entity: none, draft, published. Otherwise marketing announces an English launch while half the account area remains untranslated.

A glossary of terms such as account, trade, withdrawal, and service saves nerves. Machine translation changes product terms every time. For white label, a glossary is especially important: client support and UI must speak the same language.

Do not add a language to the switcher until the minimum package is complete: home, registration/contact, key services or account area, and offer terms. An empty language is worse than no language.

Technical traps

Page cache without language awareness serves the wrong locale. Emails and PDF invoices in the wrong language. Form validation errors in the default locale. Sitemap with missing prefixes. Open Graph without localized title. All of this is caught by the acceptance checklist, not "we will see in production".

Editor permissions: who can publish en without being able to break ru. Split roles if the team is large. Back up before bulk importing translations: one bad CSV can overwrite live texts.

After adding a language, crawl the site and search per prefix. Empty results and 404s in a new language are normal first-month issues; keep a table and fix them in batches.

Content priorities by language

Do not translate everything in the first week. Order: legal and registration, home, top services or account screens, emails, then the rest of the blog. A blog in the second language without an audience can stay out of the switcher. Honest scope is better than decorative "12 languages" with placeholder text.

Local phone numbers and addresses on country versions are a separate decision. Sometimes one international contact is enough. If offices differ, update the footer and organization schema so clients are not confused.

Check site search: whether it indexes all languages and whether it mixes results. Language filtering is useful on large corporate sites. On a two-language landing page, search may be unnecessary.

For white-label account multilingual support, test as a client, not as an admin. Admins often see all translation keys; clients see gaps.

Translation acceptance on real devices

Long button text, header wrapping, and different menu lengths must be checked on a phone. RTL languages are a separate story; do not promise Arabic if layout was not prepared. For en/de and similar left-to-right languages, careful checks and flexible buttons are usually enough.

Compare emails in every language: subject, body, password-reset link with the correct locale prefix. An error here hurts trust more than an untranslated blog footer.

Document for editors how to create a linked translation of a news item, not a duplicate without a relation. Otherwise hreflang and the switcher will never align.

Reporting by language

In analytics, separate traffic by language prefix or dimension. Otherwise the success of the English version is hidden under dominant default-language traffic. Also watch form conversion by language: sometimes the translation is good, but the offer does not fit the market, which is a product conclusion, not "bad PHP".

Rule. Language = its own URL + translated entities + hreflang. A translation widget without friendly URLs is not SEO multilingual support.

FAQ

Multilingual website php script?

Multilingual support is needed by white-label platforms and websites with audiences in several countries.

How long does “Multilingual PHP script website” take?

About 6 minutes to read. In practice it depends on your hosting and database setup.

Do I need a dedicated server?

For most scripts, shared hosting or a VDS with PHP and MySQL is enough. See the VDS section and PHP/MySQL requirements.

Turnkey php mysql website development?

See the related manual for this query. turnkey php mysql website development

Turnkey landing page with cms?

See the related manual for this query. turnkey landing page with cms

Section
Turnkey website

Showcases and corporate sites without WordPress.