Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update translation doc #462

Merged
merged 5 commits into from
Jun 11, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions docs/TranslationGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,20 @@ and append the new two-letter language code of the new language.

### zonemaster.conf-example

In the Apache example configuration add a rewrite rule to redirect the
user to the new language:
In the Apache example configuration, update the rewrite rules and conditions
to add the new language. In the following example, `...` are used to mark
existing language codes.

```apache
RewriteCond %{HTTP:Accept-Language} ^<LANG> [NC]
RewriteRule ^$ /<LANG>/ [R,L]
# Redirect everything to index.html
RewriteRule "^(...|<LANG>)" $1/index.html [L]

# Rewrite path to new language scheme using preferred locale
RewriteCond $1 "!^(...|<LANG>|assets)"
RewriteCond %{HTTP:Accept-Language} ^(...|<LANG>) [NC]

# Redirect user based on prefered locale
RewriteCond %{HTTP:Accept-Language} ^(...|<LANG>) [NC]
```
tgreenx marked this conversation as resolved.
Show resolved Hide resolved

### Configuration
Expand Down
Loading