Skip to content

Latest commit

 

History

History
58 lines (52 loc) · 1.2 KB

File metadata and controls

58 lines (52 loc) · 1.2 KB
description Automatically generated file. DO NOT MODIFY
const options = {
	authProvider,
};

const client = Client.init(options);

const regionalAndLanguageSettings = {
    defaultDisplayLanguage: {
        locale: 'en-US'
    },
    authoringLanguages: [
        {
            locale: 'fr-FR'
        },
        {
            locale: 'de-DE'
        }
    ],
    defaultTranslationLanguage: {
        locale: 'en-US'
    },
    defaultSpeechInputLanguage: {
        locale: 'en-US'
    },
    defaultRegionalFormat: {
        locale: 'en-GB'
    },
    regionalFormatOverrides: {
        calendar: 'Gregorian Calendar',
        firstDayOfWeek: 'Sunday',
        shortDateFormat: 'yyyy-MM-dd',
        longDateFormat: 'dddd, MMMM d, yyyy',
        shortTimeFormat: 'HH:mm',
        longTimeFormat: 'h:mm:ss tt',
        timeZone: 'Pacific Standard Time'
    },
    translationPreferences: {
        translationBehavior: 'Yes',
        languageOverrides: [
            {
                languageTag: 'fr',
                translationBehavior: 'Yes'
            }
        ]
     }
};

await client.api('/me/settings/regionalAndLanguageSettings')
	.version('beta')
	.put(regionalAndLanguageSettings);