Note: When a client decided to enter the international market, their Russian Laravel store started losing positions: Google showed Russian pages to English-speaking users, and content duplicates led to a 40% traffic drop in a month. Rewriting the architecture from scratch was necessary — a typical mistake when starting without i18n. Such costs can be avoided by baking internationalization into the first commit. Our experience shows: the right architecture pays off within the first three months. For example, one home appliance e-commerce project after implementing multilingual support in 4 languages increased international traffic by 70% and average conversion rate grew by 15% thanks to adapted product descriptions, generating an additional $50,000 in revenue per quarter. Another client saved $2,000 on fixing duplicates after proper hreflang setup.
i18n is not just interface translation. It's URL architecture, content storage, SEO markup, caching, deployment. An error at the start costs 3–5 times more than implementing correctly right away. Engineers with domain experience have solved similar tasks for 20+ e-commerce and SaaS projects. We guarantee correct work at all stages: from URL strategy selection to final deployment with translation caching in Redis. According to official Laravel documentation, the Astrotomic Translatable package greatly simplifies multilingual models.
Choosing a URL Strategy for Multilingual Sites
There are three main approaches to organizing URLs for multilingual sites:
| Strategy | Examples | When to Use |
|---|---|---|
| Subdomain | ru.example.com, en.example.com |
Different servers or CDN per region, high isolation |
| Path | example.com/ru/, example.com/en/ |
Single server, most cases, simplicity |
| Separate domain | example.ru, example.com |
Different legal entities or brands, but more expensive to support |
Path (/ru/, /en/) is the most common and simplest to implement. Subdomain is better for geographically separated audiences. The choice depends on project requirements, but path is the optimal start.
Why hreflang is Important for SEO?
Without hreflang, search engines may show the wrong language version to users or treat pages as duplicates. Proper markup is a mandatory requirement for multilingual SEO. We automatically generate hreflang for all pages based on routes and locales, including x-default. Savings on fixing duplicates: up to 50%. Incorrect hreflang usage can lead to penalties and budget loss of up to $500 per month on ads.
Backend Architecture
On the backend, we use the Astrotomic Translatable package for Eloquent. Example model:
use Astrotomic\Translatable\Contracts\Translatable as TranslatableContract; use Astrotomic\Translatable\Translatable; class Product extends Model implements TranslatableContract { use Translatable; public array $translatedAttributes = ['title', 'description', 'slug']; protected $fillable = ['price', 'sku', 'is_active']; } Routing with locale prefix and middleware to set the locale:
Route::prefix('{locale}') ->where(['locale' => 'ru|en|de|fr|uk']) ->middleware('setLocale') ->group(function () { Route::get('/', [HomeController::class, 'index'])->name('home'); Route::get('/catalog', [CatalogController::class, 'index'])->name('catalog'); Route::get('/catalog/{slug}', [ProductController::class, 'show'])->name('product'); }); The SetLocale middleware sets the locale from the route, session, or browser.
Frontend with i18next
On the frontend, we use i18next with react-i18next. For Vue applications, vue-i18n is used with a similar architecture. Configuration:
import i18n from 'i18next'; import { initReactI18next } from 'react-i18next'; import HttpBackend from 'i18next-http-backend'; import LanguageDetector from 'i18next-browser-languagedetector'; i18n .use(HttpBackend) .use(LanguageDetector) .use(initReactI18next) .init({ fallbackLng: 'ru', supportedLngs: ['ru', 'en', 'de', 'fr', 'uk'], ns: ['common', 'catalog', 'checkout'], defaultNS: 'common', backend: { loadPath: '/locales/{{lng}}/{{ns}}.json' }, detection: { order: ['path', 'cookie', 'localStorage', 'navigator'], lookupFromPathIndex: 0 }, interpolation: { escapeValue: false }, }); Translation files are stored in public/locales/{lng}/{ns}.json.
SEO for Multilingual Sites
We generate hreflang tags for each page:
function hreflangTags(string $routeName, array $params = []): string { $locales = ['ru', 'en', 'de', 'fr', 'uk']; $tags = ''; foreach ($locales as $locale) { $url = route($routeName, array_merge($params, ['locale' => $locale])); $tags .= "<link rel=\"alternate\" hreflang=\"{$locale}\" href=\"{$url}\" />\n"; } $defaultUrl = route($routeName, array_merge($params, ['locale' => 'ru'])); $tags .= "<link rel=\"alternate\" hreflang=\"x-default\" href=\"{$defaultUrl}\" />\n"; return $tags; } Include alternates in sitemap.xml.
How to Automate Content Translation?
Primary translation via Google Translate API:
$results = (new TranslateClient(['key' => $key]))->translateBatch($texts, [ 'source' => 'ru', 'target' => $targetLang, 'format' => 'html', ]); Then manual proofreading. We cache translation files in Redis with a TTL of 1 hour to avoid reading JSON on every request. For bulk translation of products, we use Laravel's queue: dispatch a ProcessTranslation job for each model after saving. This avoids blocking requests and scales translation to hundreds of thousands of records.
Example implementation of translation caching
// Cache translations for 1 hour Cache::remember('translations.' . $locale, 3600, function () use ($locale) { return Translation::where('locale', $locale)->get(); }); Thanks to caching, we reduced TTFB by 300 ms or more and server load by 40%.
How to Avoid Common Mistakes?
Incorrect hreflang setup (x-default, languages not matching actual ones) leads to search engine penalties. Missing translation caching — each request reads JSON, increasing TTFB by 300 ms or more. Ignoring pluralization and declensions is critical for Slavic languages. Mixing content and interface in one file complicates maintenance. We design translation files with namespace separation, reducing string lookup time by 30%. 95% of all SEO duplicate errors are eliminated at the design stage.
Implementation Process
Work on multilingual support proceeds step by step:
- Analytics — define language list, regions, SEO requirements.
- Design — design database tables, middleware, routes, translation file structure.
- Implementation — set up backend (Laravel Translatable), frontend (i18next), integration with translation API.
- Testing — check language switching, pluralization, SEO tags, no broken links.
- Deployment — deploy with translation caching (Redis) and configured sitemap.
Get a consultation on your project — we will clarify the steps and timelines.
What is Included
- Architectural documentation.
- Access to translation management system.
- Team training on i18n.
- One month of support after launch.
Estimated Timelines
| Stage | Time |
|---|---|
| Basic infrastructure (routes, middleware, Translatable, i18next) | 3–4 days |
| Interface translation into 4–5 languages + proofreading | 3–5 days |
| Full launch with SEO and sitemap | 1–1.5 weeks |
Pricing is calculated individually after estimating the scope of work. Order a consultation with an engineer for your project — we will discuss the details and estimate the workload.







