mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 02:09:45 +07:00
Merge pull request #13066 from nextcloud/backport/13063/stable31
[stable31] feat: Document new query parameter forceLanguage
This commit is contained in:
@@ -125,6 +125,7 @@ Added APIs
|
||||
- New events ``OCP\User\Events\BeforeUserIdUnassignedEvent``, ``OCP\User\Events\UserIdUnassignedEvent``, and ``OCP\User\Events\UserIdAssignedEvent`` have been added to replace the hooks ``\OC\User::preUnassignedUserId``, ``\OC\User::postUnassignedUserId`` and ``\OC\User::assignedUserId``.
|
||||
- New interface ``OCP\Files\Storage\IConstructableStorage`` for storages that can be built by passing only an array to the constructor.
|
||||
- New service ``OCP\RichObjectStrings\IRichTextFormatter`` to format rich text into parsed plain text using its ``richToParsed`` method.
|
||||
- New magic query parameter ``forceLanguage`` to force a specific language for a web request (API or frontend). See :ref:`Forcing language for a given call<api-force-language>`.
|
||||
|
||||
Changed APIs
|
||||
^^^^^^^^^^^^
|
||||
|
||||
@@ -255,3 +255,14 @@ In case needed, you can also further filter the auto-complete results on the PHP
|
||||
``OCP\Collaboration\AutoComplete\AutoCompleteEvent`` event. The event gives you access to the current
|
||||
result set, the item and share types and some more information that you can use to e.g. limit the autocomplete
|
||||
results to users that are actually in the current chat conversation.
|
||||
|
||||
.. _api-force-language:
|
||||
|
||||
Force language for a given call
|
||||
-------------------------------
|
||||
|
||||
All Nextcloud API calls support forcing the language using the query parameter ``forceLanguage``. It will override any user setting for the given call.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
curl -u username:password -X GET 'https://cloud.example.com/ocs/v1.php/...?forceLanguage=en' -H "OCS-APIRequest: true"
|
||||
|
||||
Reference in New Issue
Block a user