Multilingual URL Behavior
Files: src/config/language.json, src/config/config.toml · Skill level: Beginner
Veltro ships in English, French, and Arabic, listed in src/config/language.json. Arabic is the right-to-left example: see RTL & Arabic.
[ { "languageName": "English", "languageCode": "en", "contentDir": "english", "dir": "ltr", "ogLocale": "en_US", "dateLocale": "en-US", "weight": 1 }, { "languageName": "Français", "languageCode": "fr", "contentDir": "french", "dir": "ltr", "ogLocale": "fr_FR", "dateLocale": "fr-FR", "weight": 2 }, { "languageName": "العربية", "languageCode": "ar", "contentDir": "arabic", "dir": "rtl", "ogLocale": "ar_SA", "dateLocale": "ar", "weight": 3 }]The routing controls are:
[settings.multilingual] enable = true defaultLanguage = "en" disableLanguages = [""] showDefaultLangInUrl = falseWith the shipped values:
- English uses
/about/ - French uses
/fr/about/ - Arabic uses
/ar/about/
If showDefaultLangInUrl is true, English uses /en/about/.
getLocaleUrlCTM() localizes internal links, preserves external, mailto:, and tel: URLs, removes Markdown extensions, and applies the configured trailing-slash behavior.
Restart development after changing multilingual routing settings. To add or remove a language, see Internationalization.
Missing Pages
Every language has its own 404 page, such as /fr/404/, and these are left out of the sitemap. On Netlify, the included netlify.toml sends a missing /fr/ or /ar/ address to that page. See Deployment.