Skip to content

Add --accept-language to rsvg-convert

This fixes #356 (closed) by adding a --accept-language option to rsvg-convert, which can be used like this:

  rsvg-convert --accept-language=es-MX,en,fr foo.svg

Historically librsvg has handled <switch> and the systemLanguage attribute by using g_get_language_names() to pick up the user's language from the environment. This is inconvenient for applications that want to select a language without synthesizing a LANG environment variable or such.

Instead, those applications can now use --accept-language with an HTTP Accept-Language header, like the example above.

To-do: add this to the C API; this is only available from the Rust API right now.

Merge request reports