There are some really nice code examples for the CSOM Regional and Language APIs in the Office Dev PnP Library:
https://github.com/OfficeDev/PnP/tree/master/Samples/Core.Settings.LocaleAndLanguage
But, I could not find JSOM code example of these APIs. So I am listing down some of the most frequently used Regional and Language functions here.
A full list of all the regional settings properties is available here:
https://msdn.microsoft.com/EN-US/library/office/jj244880.aspx
This one was a bit tricky but I finally got there in the end. You will need to know the ID of the Time Zone you want to set in the site. A full list of SharePoint TimeZone IDs is here:
https://msdn.microsoft.com/library/microsoft.sharepoint.spregionalsettings.timezones.aspx
https://github.com/OfficeDev/PnP/tree/master/Samples/Core.Settings.LocaleAndLanguage
But, I could not find JSOM code example of these APIs. So I am listing down some of the most frequently used Regional and Language functions here.
1) Add a Supported UI Language:
2) Remove a Supported UI Language:
3) Disable Multi Lingual and Remove all UI Languages:
4) Get Regional Settings:
A full list of all the regional settings properties is available here:
https://msdn.microsoft.com/EN-US/library/office/jj244880.aspx
5) Set Regional Settings:
6) Set Time Zone of a site:
This one was a bit tricky but I finally got there in the end. You will need to know the ID of the Time Zone you want to set in the site. A full list of SharePoint TimeZone IDs is here:
https://msdn.microsoft.com/library/microsoft.sharepoint.spregionalsettings.timezones.aspx
Comments
Post a Comment