Get selected UI-Language in python I work with an add on for Blender and after hours of debugging I finally found the culprit. It's the localisation.
For Example:
When i add a modificator, i. e. &quot;Smooth&quot; it is added as &quot;Weich&quot; in the german localisation. So far, so good. But if the coder uses another language as the user (coder: english,user: german) in lines such as
bpy.ops.object.modifier_add(type=&quot;REMESH&quot;)
bpy.context.object.modifiers[&quot;Remesh&quot;].mode = &quot;SMOOTH&quot;
you get an error, that blender can't find the keyword &quot;Remash&quot;, which is understandable, because the correct keyword would be &quot;Weich&quot; if you selected the german localisation.
My questions are:

Is there a way to list all installed localisation?
is there a way to check for the chosen localisation at the start of a script?

thanks in advance
Both methods are provided by Blender API.
A way to list all installed localisation
&gt;&gt;&gt; bpy.app.translations.locales
('en_US', 'es', 'ja_JP', 'sk_SK', 'vi_VN', 'zh_CN', 'ar_EG', 'de_DE', 'fr_FR', 'it_IT', 'ko_KR', 'pt_BR', 'pt_PT', 'ru_RU', 'uk_UA', 'zh_TW', 'ab', 'ca_AD', 'cs_CZ', 'eo', 'eu_EU', 'fa_IR', 'ha', 'he_IL', 'hi_IN', 'hr_HR', 'hu_HU', 'id_ID', 'ky_KG', 'nl_NL', 'pl_PL', 'sr_RS', 'sr_RS@latin', 'sv_SE', 'th_TH', 'tr_TR')

A way to check for the chosen localisation
&gt;&gt;&gt; bpy.context.preferences.view.language
'de_DE'

&gt;&gt;&gt; bpy.context.preferences.view.use_translate_interface
True

&gt;&gt;&gt; bpy.context.preferences.view.use_translate_new_dataname
True

&gt;&gt;&gt; bpy.context.preferences.view.use_translate_tooltips
True