Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
^^^^^^^^^^^^
Expand Down
5 changes: 5 additions & 0 deletions developer_manual/basics/translations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,3 +327,8 @@ Adding translations
-------------------

The steps how to set up translations for an app have been moved to it's own page in the "App development" chapter: :ref:`Translation setup`

Testing translations
--------------------

You can use the 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>`.
11 changes: 11 additions & 0 deletions developer_manual/client_apis/OCS/ocs-api-overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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"