Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed May 14, 2022
1 parent 304690f commit 908f083
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/docusaurus-types/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export type I18nConfig = {
*/
defaultLocale: string;
/**
* Root folder where all locale folders are relative to. Can be absolute or
* relative to the config file.
* Root folder where all locale folders are located in. Can be absolute or
* relative to the site dir.
*/
path: string;
/** List of locales deployed on your site. Must contain `defaultLocale`. */
Expand Down Expand Up @@ -423,7 +423,8 @@ export type LoadContext = {
outDir: string;
/**
* Directory where all source translations for the current locale can be found
* in. Constructed with `i18n.path` + `i18n.currentLocale.path` (e.g. i18n/en)
* in. Constructed with `i18n.path` + `i18n.currentLocale.path`
* (e.g. `<siteDir>/i18n/en`)
*/
i18nDir: string;
/**
Expand Down
2 changes: 2 additions & 0 deletions website/docs/api/docusaurus.config.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ Example:
module.exports = {
i18n: {
defaultLocale: 'en',
path: 'i18n',
locales: ['en', 'fa'],
localeConfigs: {
en: {
Expand All @@ -150,6 +151,7 @@ module.exports = {
```

- `defaultLocale`: The locale that (1) does not have its name in the base URL (2) gets started with `docusaurus start` without `--locale` option (3) will be used for the `<link hrefLang="x-default">` tag
- `path`: Root folder where all locale folders are located in. Can be absolute or relative to the site dir.
- `locales`: List of locales deployed on your site. Must contain `defaultLocale`.
- `localeConfigs`: Individual options for each locale.
- `label`: The label displayed for this locale in the locales dropdown.
Expand Down

0 comments on commit 908f083

Please sign in to comment.