You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds an optional localized property on the Shotgun object which allows to get localized display names on methods schema_entity_read(), schema_field_read(), and schema_read().
Copy file name to clipboardExpand all lines: docs/reference.rst
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -891,3 +891,46 @@ Stores the number of milliseconds to wait between request retries. By default,
891
891
892
892
In the case that both this environment variable and the config's ``rpc_attempt_interval`` property are set, the value in ``rpc_attempt_interal`` will be used.
893
893
894
+
************
895
+
Localization
896
+
************
897
+
898
+
The Shotgun API offers the ability to return localized display names in the current user's language.
899
+
Requests made from script/API users are localized in the site settings.
900
+
901
+
This functionality is currently supported by the methods ``Shotgun.schema_entity_read``, ``Shotgun.schema_field_read``, and ``Shotgun.schema_read``.
902
+
903
+
Localization is disabled by default. To enable localization, set the ``localized`` property to ``True``.
904
+
905
+
Example for a user whose language preference is set to Japanese:
:returns: dict of Entity Type to dict containing the display name.
1820
1821
:rtype: dict
1822
+
1823
+
.. note::
1824
+
The returned display names for this method will be localized when the ``localize`` Shotgun config property is set to ``True``. See :ref:`localization` for more information.
The returned display names for this method will be localized when the ``localize`` Shotgun config property is set to ``True``. See :ref:`localization` for more information.
If you don't specify a ``project_entity``, everything is reported as visible.
1919
1926
1927
+
.. note::
1928
+
The returned display names for this method will be localized when the ``localize`` Shotgun config property is set to ``True``. See :ref:`localization` for more information.
0 commit comments