Hint: you want to scrape the output of a Unix command but it might be localised… no worries, run it with the LANG=C environment variable set and you’ll always get the built-in C strings:
e.g., LANG=C hostnamectl
(Hostnamectl doesn’t look like it’s localised at the moment on my system at least but who knows about tomorrow…)