diff --git a/docs/configuration.md b/docs/configuration.md index 55e99179..7cc7f9dc 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -24,7 +24,8 @@ if you are doing debug or development: - `NEODB_SITE_INTRO` - `NEODB_SITE_HEAD` - `NEODB_SITE_DESCRIPTION` - - `NEODB_LANGUAGE` - default language when importing titles from 3rd party sites like TMDB and Steam, set it to one of `en` / `zh-hans` / `zh-hant` + - `NEODB_PREFERRED_LANGUAGES` - preferred languages when importing titles from 3rd party sites like TMDB and Steam, comma-separated list of ISO-639-1 two-letter codes, 'en,zh' by default. + - `NEODB_FILTER_LANGUAGE_FOR_DISCOVER` - when set to `True`, `/discover/` will only show items with languages match one of `NEODB_PREFERRED_LANGUAGES`. `False` by default. - `NEODB_SITE_LINKS` - a list of title and links to show in the footer, comma separated, e.g. `Feedback=https://discord.gg/8KweCuApaK,ToS=/pages/rules/` - `NEODB_INVITE_ONLY` - `False` by default, set to `True` to require invite code(generated by `neodb-manage invite --create`) to register - `NEODB_ENABLE_LOCAL_ONLY` - `False` by default, set to `True` to allow user to post marks as "local public" diff --git a/docs/development.md b/docs/development.md index 2c12909b..1a6d2c92 100644 --- a/docs/development.md +++ b/docs/development.md @@ -104,7 +104,7 @@ neodb-shell neodb-init Run unit test: ``` -NEODB_LANGUAGE=zh-hans neodb-manage test +neodb-manage test ``` Update translations: diff --git a/docs/install.md b/docs/install.md index dd237921..16b18ad9 100644 --- a/docs/install.md +++ b/docs/install.md @@ -36,7 +36,7 @@ Change essential options like `NEODB_SITE_DOMAIN` in `.env` before starting the - `NEODB_SECRET_KEY` - encryption key of session data - `NEODB_DATA` is the path to store db/media/cache, it's `../data` by default, but can be any path that's writable - `NEODB_DEBUG` - set to `False` for production deployment -- `NEODB_LANGUAGE` - default language when importing titles from 3rd party sites like TMDB and Steam, set it to one of `en` / `zh-hans` / `zh-hant` +- `NEODB_PREFERRED_LANGUAGES` - preferred languages when importing titles from 3rd party sites like TMDB and Steam, comma-separated list of ISO-639-1 two-letter codes, 'en,zh' by default. Optionally, `robots.txt` and `logo.png` may be placed under `$NEODB_DATA/www-root/`. diff --git a/neodb.env.example b/neodb.env.example index e3e930ac..921449ea 100644 --- a/neodb.env.example +++ b/neodb.env.example @@ -17,8 +17,8 @@ NEODB_SITE_LOGO=/logo.png NEODB_SITE_ICON=/icon.png NEODB_SITE_LINKS=@NiceDB=https://donotban.com/@testie,@NeoDB=https://mastodon.social/@neodb -# default language -# NEODB_LANGUAGE=en +# preferred languages +# NEODB_PREFERRED_LANGUAGES=en,es,fr,de,pt,zh,ja,ko # To enable push notification, generate a keypair from https://web-push-codelab.glitch.me # TAKAHE_VAPID_PUBLIC_KEY=