Skip to content

Commit

Permalink
Update docs (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
aralroca authored Jun 5, 2020
1 parent 3063ab7 commit 54612ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ In order to use each translation in the project, use the _translation id_ compos

| Option | Description | Type | Default |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- | -------------------------------------------------------------------------- |
| `defaultLanguage` | ISO of the default locale ("en" as default). | `string\|function` | `"en"` |
| `defaultLanguage` | ISO of the default locale ("en" as default). | `string\|function` | `"en"` |
| `allLanguages` | An array with all the languages to use in the project. | `Array<string>` | `[]` |
| `ignoreRoutes` | An array with all the routes to ignore in the middleware. This config property only effects using the `i18nMiddleware`, SO MAYBE YOU'LL NEVER NEED THIS. | `Array<string>` | `['/_next/', '/static/', '/favicon.ico', '/manifest.json', '/robots.txt']` |
| `defaultLangRedirect` | It accepts `lang-path` and `root` as string. If it's set to `lang-path` redirects the default language routes from `/my-route` to `/en/my-route`. If it's set to `root` redirects the default language routes from `/en/my-route` to `/my-route`. Otherwise, when it's not defined, it's not doing any redirect (default). | `string\|undefined` | undefined |
| `defaultLangRedirect` | It accepts `lang-path` and `root` as string. If it's set to `lang-path` redirects the default language routes from `/my-route` to `/en/my-route`. If it's set to `root` redirects the default language routes from `/en/my-route` to `/my-route`. Otherwise, when it's not defined, it's not doing any redirect (default). | `string\|undefined` | undefined |
| `currentPagesDir` | A string with the directory where you have the pages code. This is needed for the "build step". | `string` | `"pages_"` |
| `finalPagesDir` | A string with the directory that is going to be used to build the pages. Only "pages" and "src/pages" are possible. This is needed for the "build step". | `string` | `"pages"` |
| `localesPath` | A string with the directory of JSONs locales. This is needed for the "build step". | `string` | `"locales"` |
Expand Down Expand Up @@ -562,6 +562,7 @@ export default class MyDocument extends Document {

- **Props**:
- `props` - Object - the document properties
- `i18nConfig` - Object - i18n config. Is optional. By default is using the config from `/i18n.json` file.

## 6. Plurals

Expand Down Expand Up @@ -856,6 +857,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-translate",
"version": "0.17.1-canary.2",
"version": "0.17.1",
"description": "Next.js utility to translate pages without the need of a server (static i18n pages generator).",
"license": "MIT",
"keywords": [
Expand Down

0 comments on commit 54612ac

Please sign in to comment.