···2727 - `null`: don't use analytics;
2828 - `{ provider: 'plausible' }`: use [Plausible](https://plausible.io/), a privacy-friendly alternative to Google Analytics; or
2929 - `{ provider: 'google', tagId: <your-google-tag> }`: use Google Analytics
3030+- `locale`: used for [[i18n]] and date formatting
3031- `baseUrl`: this is used for sitemaps and RSS feeds that require an absolute URL to know where the canonical 'home' of your site lives. This is normally the deployed URL of your site (e.g. `quartz.jzhao.xyz` for this site). Do not include the protocol (i.e. `https://`) or any leading or trailing slashes.
3132 - This should also include the subpath if you are [[hosting]] on GitHub pages without a custom domain. For example, if my repository is `jackyzha0/quartz`, GitHub pages would deploy to `https://jackyzha0.github.io/quartz` and the `baseUrl` would be `jackyzha0.github.io/quartz`
3233 - Note that Quartz 4 will avoid using this as much as possible and use relative URLs whenever it can to make sure your site works no matter _where_ you end up actually deploying it.
+18
docs/features/i18n.md
···11+---
22+title: Internationalization
33+---
44+55+Internationalization allows users to translate text in the Quartz interface into various supported languages without needing to make extensive code changes. This can be changed via the `locale` [[configuration]] field in `quartz.config.ts`.
66+77+The locale field generally follows a certain format: `{language}-{REGION}`
88+99+- `{language}` is usually a [2-letter lowercase language code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes).
1010+- `{REGION}` is usually a [2-letter uppercase region code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
1111+1212+> [!tip] Interested in contributing?
1313+> We [gladly welcome translation PRs](https://github.com/jackyzha0/quartz/tree/v4/quartz/i18n/locales)! To contribute a translation, do the following things:
1414+>
1515+> 1. In the `quartz/i18n/locales` folder, copy the `en-US.ts` file.
1616+> 2. Rename it to `{language}-{REGION}.ts` so it matches a locale of the format shown above.
1717+> 3. Fill in the translations!
1818+> 4. Add the entry under `TRANSLATIONS` in `quartz/i18n/index.ts`.
+1-1
docs/index.md
···31313232## 🔧 Features
33333434-- [[Obsidian compatibility]], [[full-text search]], [[graph view]], note transclusion, [[wikilinks]], [[backlinks]], [[Latex]], [[syntax highlighting]], [[popover previews]], [[Docker Support]], and [many more](./features) right out of the box
3434+- [[Obsidian compatibility]], [[full-text search]], [[graph view]], note transclusion, [[wikilinks]], [[backlinks]], [[Latex]], [[syntax highlighting]], [[popover previews]], [[Docker Support]], [[i18n|internationalization]] and [many more](./features) right out of the box
3535- Hot-reload for both configuration and content
3636- Simple JSX layouts and [[creating components|page components]]
3737- [[SPA Routing|Ridiculously fast page loads]] and tiny bundle sizes
+6-2
quartz/cfg.ts
···11import { ValidDateType } from "./components/Date"
22import { QuartzComponent } from "./components/types"
33+import { ValidLocale } from "./i18n"
34import { PluginTypes } from "./plugins/types"
45import { Theme } from "./util/theme"
56···3940 /**
4041 * Allow to translate the date in the language of your choice.
4142 * Also used for UI translation (default: en-US)
4242- * Need to be formated following the IETF language tag format (https://en.wikipedia.org/wiki/IETF_language_tag)
4343+ * Need to be formated following BCP 47: https://en.wikipedia.org/wiki/IETF_language_tag
4444+ * The first part is the language (en) and the second part is the script/region (US)
4545+ * Language Codes: https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes
4646+ * Region Codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
4347 */
4444- locale?: string
4848+ locale: ValidLocale
4549}
46504751export interface QuartzConfig {