[librsvg: 6/35] rsvg-convert.1: Section for multi-language SVGs
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 6/35] rsvg-convert.1: Section for multi-language SVGs
- Date: Thu, 17 Jun 2021 19:31:37 +0000 (UTC)
commit 2d17d620176cad4f92a9bd55296c2a2f23232584
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Jun 11 12:35:52 2021 -0500
rsvg-convert.1: Section for multi-language SVGs
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/547>
rsvg-convert.1 | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
---
diff --git a/rsvg-convert.1 b/rsvg-convert.1
index 00b33ce3..2eeb43bf 100644
--- a/rsvg-convert.1
+++ b/rsvg-convert.1
@@ -204,6 +204,46 @@ syntax or CSS named colors like
#### translucent red - use shell quotes so the # is not interpreted as a comment
.RE
+.SS SELECTING A LANGUAGE FOR MULTI-LANGUAGE SVG
+
+An SVG document can use the
+.B <switch>
+element and children with the
+.B systemLanguage
+attribute to provide different content depending on the user's language. For example:
+.P
+.in +4n
+.EX
+<svg xmlns="http://www.w3.org/2000/svg" width="200" height="100">
+ <rect width="200" height="100" fill="white"/>
+ <g transform="translate(30, 30)" font-size="20">
+ <switch allowReorder="yes">
+ <text systemLanguage="es">Español</text>
+ <text systemLanguage="de">Deutsch</text>
+ <text systemLanguage="fr">Français</text>
+ <text>English fallback</text>
+ </switch>
+ </g>
+</svg>
+.EE
+.in
+.P
+You can use the
+.B --accept-language
+option to select which language to use when rendering. This option accepts strings formatted like
+an HTTP Accept-Language header, which is a comma-separated list of BCP47 language tags:
+https://www.rfc-editor.org/info/bcp47
+
+.P
+.RS
+.B rsvg-convert
+.BI --accept-language= es-MX
+.I input.svg
+.B >
+.I output.png
+#### selects Mexican Spanish; renders "Español".
+.RE
+.P
.SH OPTIONS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]