A quick orientation: this page explains how the site locale generator produces complete locale structures for an entire website, walks through the configuration steps, highlights the structural errors that undermine most locale rollouts, and describes how this tool differs from page-level hreflang generators.
What is a site locale generator?
A site locale generator creates the full locale configuration for a website — the set of language and region codes, URL patterns, fallback rules, and x-default assignments that define how every page on your site maps to its counterparts in other languages. Instead of configuring hreflang relationships one page at a time, you define the locale structure at the site level and the generator applies it globally.
Think of it as the architectural blueprint for your multilingual site. Before you generate individual hreflang tags or URL maps, you need to decide: which locales does this site support? What URL pattern does each locale use? Which locale is the x-default? How do new pages inherit locale assignments? The site locale generator answers all of these questions in a single, exportable configuration.
The output is a structured locale manifest — a JSON or YAML document that describes your site's complete locale topology. This manifest can drive automated hreflang tag generation, sitemap creation, and CMS locale configuration. It serves as the single source of truth for every downstream tool that needs to know which locales exist and how their URLs are structured.
All processing runs in the browser. Your site structure data stays on your machine and is never transmitted to any server.
How to use this site locale generator
Follow these steps to generate a complete locale structure:
-
Enter your primary domain and locale. Start with your site's main domain (e.g.,
https://example.com) and its primary locale code (e.g.,enoren-US). This becomes the base against which all other locales are defined. -
Add target locales. For each additional language or region your site supports, add a locale entry specifying the ISO 639-1 language code (with optional ISO 3166-1 region code) and the URL pattern. Supported patterns include subdirectory (
/es/), subdomain (es.example.com), and separate domain (example.es). -
Configure x-default. Select which locale or URL serves as the x-default fallback for users whose language preferences don't match any declared locale. You can point x-default to an existing locale (commonly the English version) or to a dedicated language-selector page.
-
Define page path rules. Specify how page paths translate between locales. Options include identical paths (same slug across locales), prefix substitution only (slug stays the same, only the locale prefix changes), or per-page mapping (for sites with translated slugs).
-
Generate and export. The generator produces the complete locale manifest. Review the summary table showing all locales, their URL patterns, and x-default assignment. Export as JSON for integration with the hreflang tag generator or as YAML for CMS and CI/CD configuration files.
Common errors and how to fix them
These are the five structural mistakes that break most site-wide locale configurations.
-
Overlapping locale codes. Defining both
en(generic English) anden-USwithout also definingen-GBcreates ambiguity: which locale handles British English users? The generator validates that your locale set is internally consistent and warns about gaps in regional coverage. -
Inconsistent URL pattern types. Mixing subdirectory locales with subdomain locales without clear documentation creates maintenance problems. The generator tracks which pattern type each locale uses and flags inconsistencies that could confuse automated tools.
-
Missing x-default assignment. Omitting x-default means search engines have no fallback for users in unlisted locales. The generator requires an x-default entry before it will produce the final manifest.
-
Duplicate locale assignments. Accidentally assigning the same locale code to two different URL patterns produces conflicting hreflang signals. The generator enforces unique locale codes across your entire site structure.
-
Forgetting locale inheritance rules. When you add a new page to your site, it should automatically inherit the locale structure. The generator's manifest includes inheritance rules so downstream tools know how to handle new pages without manual configuration.
How this tool is different
Four things set this site locale generator apart from page-level tools and manual locale configuration:
- Site-wide scope. While the hreflang tag generator works at the page level, this tool defines the locale structure for your entire site. You configure once and apply everywhere.
- Manifest-driven output. The generator produces a structured configuration document, not HTML tags. This manifest feeds into tag generators, sitemap builders, and CMS configurations as a single source of truth.
- Structural validation. The tool checks for architectural problems — overlapping codes, missing fallbacks, inconsistent patterns — that page-level tools can't detect because they don't see the full picture.
- Growth-ready defaults. The manifest includes inheritance rules for new pages and locales, so your hreflang infrastructure scales as your site grows without per-page reconfiguration.
Everything runs in your browser with no data leaving your machine. For deeper background on locale codes and hreflang architecture, see the what is hreflang guide.