2016-06-30 10:06:08 +00:00
|
|
|
.. sec-jsclientlib-languages:
|
|
|
|
|
|
|
|
|
|
:mod:`OctoPrint.languages`
|
|
|
|
|
--------------------------
|
|
|
|
|
|
2016-09-22 20:21:52 +00:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
All methods here require that the used API token or a the existing browser session
|
|
|
|
|
has admin rights.
|
|
|
|
|
|
2016-06-30 10:06:08 +00:00
|
|
|
.. js:function:: OctoPrint.languages.list(opts)
|
|
|
|
|
|
2016-08-26 15:47:38 +00:00
|
|
|
Retrieves a list of available language packs.
|
|
|
|
|
|
2016-09-22 14:27:06 +00:00
|
|
|
:param object opts: Additional options for the request
|
|
|
|
|
:returns Promise: A `jQuery Promise <http://api.jquery.com/Types/#Promise>`_ for the request's response
|
|
|
|
|
|
2016-06-30 10:06:08 +00:00
|
|
|
.. js:function:: OctoPrint.languages.upload(file)
|
|
|
|
|
|
2016-08-26 15:47:38 +00:00
|
|
|
Uploads a language pack.
|
|
|
|
|
|
2016-09-22 14:27:06 +00:00
|
|
|
:param object or string file: The file to upload, see :js:func:`OctoPrint.upload` for more details
|
|
|
|
|
:returns Promise: A `jQuery Promise <http://api.jquery.com/Types/#Promise>`_ for the request's response
|
|
|
|
|
|
2016-06-30 10:06:08 +00:00
|
|
|
.. js:function:: OctoPrint.languages.delete(locale, pack, opts)
|
2016-08-26 15:47:38 +00:00
|
|
|
|
|
|
|
|
Deletes the language pack ``pack`` for the specified locale ``locale``.
|
2016-09-22 14:27:06 +00:00
|
|
|
|
|
|
|
|
:param string locale: The locale for which to delete the language pack
|
|
|
|
|
:param string pack: The identifier of the pack to delete
|
|
|
|
|
:param object opts: Additional options for the request
|
|
|
|
|
:returns Promise: A `jQuery Promise <http://api.jquery.com/Types/#Promise>`_ for the request's response
|
|
|
|
|
|
2016-09-22 20:21:52 +00:00
|
|
|
.. seealso::
|
|
|
|
|
|
|
|
|
|
:ref:`Languages API <sec-api-languages>`
|
|
|
|
|
The documentation of the underlying languages API.
|