pika-installer-gtk4/data/scripts/locale-name.py

13 lines
298 B
Python
Raw Normal View History

2024-02-19 22:22:42 +01:00
#! /usr/bin/python3
2024-02-19 20:56:53 +01:00
import gi
gi.require_version('GnomeDesktop', '4.0')
from gi.repository import GnomeDesktop
import sys
locale_name = GnomeDesktop.get_language_from_locale(sys.argv[1], None)
if locale_name is not None:
print(locale_name, end="")
else:
print("Unknown Language", end="")