This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git
The following commit(s) were added to refs/heads/master by this push:
new 58f3977 Document the default locale system property
58f3977 is described below
commit 58f3977a346e28d50a76c620b3c425503c25d415
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sat Nov 21 17:48:53 2026 +0100
Document the default locale system property
---
doxia-integration-tools/src/site/markdown/index.md | 18 ++++++++++++++++++
doxia-integration-tools/src/site/markdown/usage.md | 3 ++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/doxia-integration-tools/src/site/markdown/index.md
b/doxia-integration-tools/src/site/markdown/index.md
index 0710811..952c670 100644
--- a/doxia-integration-tools/src/site/markdown/index.md
+++ b/doxia-integration-tools/src/site/markdown/index.md
@@ -35,6 +35,24 @@ The main entry point is the
[SiteTool](./apidocs/org/apache/maven/doxia/tools/Si
[Using the SiteTool in a Mojo](./usage.html) shows how to read the site
descriptor of a project from your own plugin.
+## Default Locale
+
+The default site, the one generated at the top of the output directory, uses
the root locale: it reads `site.xml`
+and the untranslated texts. Since Doxia Sitetools 2.2.0, the system property
`maven.doxiaSitetools.defaultLocale`
+sets another locale for it, in the form of the Maven Site Plugin's
`locales` parameter (`en`, `en_US`) or as a
+language tag (`en-US`). With the property set to `de`, the default site reads
`site_de.xml` when it exists and
+falls back to `site.xml`, as a translated site does. A parent descriptor
resolved from a repository falls back to
+the plain `site` classifier, the one under which a parent attaches its
`site.xml`.
+
+The property is read once, when the `SiteTool` class is loaded, so set it for
the JVM that runs Maven, for example
+in `.mvn/jvm.config`:
+
+```
+-Dmaven.doxiaSitetools.defaultLocale=en
+```
+
+Under the Maven Daemon (mvnd), a daemon keeps the value it started with.
+
## `site.xml` Model Interpolation
Interpolation of [`site.xml` model](../doxia-site-model/site.html) injects
Maven project's information, replacing `${...}` with calculated values
like it happens in [Maven model
interpolation](/ref/current/maven-model-builder/#Model_Interpolation).
diff --git a/doxia-integration-tools/src/site/markdown/usage.md
b/doxia-integration-tools/src/site/markdown/usage.md
index 0f396b2..8982c0c 100644
--- a/doxia-integration-tools/src/site/markdown/usage.md
+++ b/doxia-integration-tools/src/site/markdown/usage.md
@@ -90,7 +90,8 @@ public class YourOwnMojo extends AbstractMojo {
}
```
-`getSiteLocales(null)` returns only `Locale.ROOT`, the default site locale.
`getRelativePath(to, from)` computes a
+`getSiteLocales(null)` returns only `SiteTool.DEFAULT_LOCALE`, the [default
site locale](./index.html#Default_Locale):
+`Locale.ROOT` unless the `maven.doxiaSitetools.defaultLocale` system property
names another one. `getRelativePath(to, from)` computes a
relative link between two locations and treats `from` as a directory.
## References