mirror of
https://github.com/tarampampam/error-pages.git
synced 2024-08-30 18:22:40 +00:00
1.6 KiB
1.6 KiB
🔤 Localization
This directory contains the file l10n.js for localizing error pages. Once the error page is loaded, this script runs and translates the page content to the user's locale.
Note
In version
2.*
, the working logic was simpler: error pages loaded this script using jsdelivr.com as a CDN for versioned content from the GitHub repository, and it translated tag content with the special HTML attributedata-l10n
.
By default, the error page markup contains strings in English (en
locale). To localize the error pages to
different locales, please follow these steps:
- Find your locale name on this page (column
Set 1
orISO 639-1:2002
) - Fork this repository
- Edit the file l10n.js in the
data
map (append new localized strings) using the locale name from step 1 - Please add your locale to the playground.html file to test the localization
- Make a PR with your changes
👍 Translators
- 🇫🇷 French by @jvin042
- 🇵🇹 Portuguese by @fabtrompet
- 🇳🇱 Dutch by @SchoNie
- 🇩🇪 German by @mschoeffmann
- 🇪🇸 Spanish by @Runig006
- 🇨🇳 Chinese by @CDN18
- 🇮🇩 Indonesian by @getwisp
- 🇵🇱 Polish by @wielorzeczownik