summaryrefslogtreecommitdiffstats
path: root/doc/classes
diff options
context:
space:
mode:
authorDan Nicholson <dbn@endlessos.org>2024-11-07 10:59:02 -0700
committerDan Nicholson <dbn@endlessos.org>2024-11-21 16:50:31 -0700
commit6f4fadf65def83a6a6c885e4aaa11f8982f37916 (patch)
tree5b50caadc24c5b960537096ba41c2443697d864f /doc/classes
parentfd4c29a189e53a1e085df5b9b9a05cac9351b3ef (diff)
downloadredot-engine-6f4fadf65def83a6a6c885e4aaa11f8982f37916.tar.gz
Expose standardize_locale add_default param publicly
Comparing locales can have surprising outcomes since it standardizes locales with defaults. For example, zh and zh_CN result in an exact match since the defaults change them both to zh_Hans_CN. Expose the add_default parameter publicly with a default of false so the fully standardized locale can be inspected.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/TranslationServer.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index 69ca984f67..f30a1da014 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -160,8 +160,9 @@
<method name="standardize_locale" qualifiers="const">
<return type="String" />
<param index="0" name="locale" type="String" />
+ <param index="1" name="add_defaults" type="bool" default="false" />
<description>
- Returns a [param locale] string standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]).
+ Returns a [param locale] string standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]). If [param add_defaults] is [code]true[/code], the locale may have a default script or country added.
</description>
</method>
<method name="translate" qualifiers="const">