Rules for translating local messages in scripts

Question for the leading developers of the pyRevit plugin.
Found the rules for script formatting: Writing pyRevit-style code.

But I still don’t see any requirements for translating non-WPF message boxes (including output).

Recently, I saw a translation method implemented in the Rename PDF Sheets script—a dictionary within the script. I thought I should stick with this method. I even managed to use it in recent PRs.

But now I saw another method - Find Range Of Roof Slopes - via resources.ResourceDictionary.XXXX.xaml.
At first, I doubted its universality, since I already needed to pass numeric values ​​(not strings). But the AI ​​convinced me it was possible:
<sys:Int32 x:Key="window_width">750</sys:Int32>
<sys:Boolean x:Key="show_warning">True</sys:Boolean>
<sys:Double x:Key="default_scale">1.5</sys:Double>
Perhaps this method also solves the problem with Locale aliases.

Which of these methods is considered more reliable? Are there plans to describe the requirements for translating local messages in scripts?

Feel free to suggest something, would be a good addition.

Personally i think if it’s like 2-3 strings, use dictionary via applocales.get_locale_string(string_dict) and if it’s more than that use applocales.get_locale_string_from_xaml(xaml_base_path, key).

This way you’re not creating a whole bunch of files just for a few translations.

@pyrevti
This is exactly the format I came to.

I’m ready to hear other opinions.

Paul is right.

This is the best avenue.

Not documented enough