Loading TOC...

clang.languageConfigWrite

clang.languageConfigWrite(
   $config as element(lang.userLanguages)
) as null

Summary

This function saves a custom language configuration specification to the cluster configuration files. Calling this function restarts MarkLogic Server.

Parameters
$config A custom language configuration specification, typically as returned from one of the custom language module functions.

Required Privileges

This function requires the custom-language-admin-write role or the following privileges:

http://marklogic.com/xdmp/privileges/custom-language-write

http://marklogic.com/xdmp/privileges/xdmp-write-cluster-config-file/languages.xml

See Also

Example

'use strict';
const clang = require('/MarkLogic/custom-language');

// NOTE: This call causes a restart.
clang.languageConfigWrite(
  clang.deleteUserLanguage(clang.languageConfigRead(), 'ca'));
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.