Skip to content

Commit

Permalink
Update RFC
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Prouillet committed Feb 6, 2018
1 parent e46e2d1 commit 53b015c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions rfcs/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,31 @@ A map is added to the Config struct to hold some i18n strings:
```toml
default_language = "en"

[languages]
[translations]

[languages.en]
[translations.en]
title = "My blog"
description = "Hello world"

[languages.fr]
[translations.fr]
title = "Mon blog"
```

### Url

The default language base url will be equal to `config.base_url`.
Other languages will be available at `{config.base_url}/{language}`
Other languages will be available at `{config.base_url}/{language}`.

There will be an option (`force_i18n_redirect` or something similar) in the config
to always redirect to a URL with a language code in it, ie `base_url` would redirect
to `{base_url}/{default_language}`.


### File organisation
The content files have to have the same name for multiple languages.
The language is defined in the extension prefix: `{name}.{language_code}.{extension}`

The language code is omitted for the default language.
The language code can be omitted for the default language.

```shell
content
Expand Down

0 comments on commit 53b015c

Please sign in to comment.