SharePoint Site "Language Settings"功能与CSOM的对应

简介: 博客地址:http://blog.csdn.net/FoxDaveSharePoint网站中的语言设置:"Language Settings",可以用CSOM通过Site的一些属性去设置它。
 博客地址: http://blog.csdn.net/FoxDave

SharePoint网站中的语言设置:"Language Settings",可以用CSOM通过Site的一些属性去设置它。

Default Language部分:

The default language of the site is specified when the site is first created.

对应的属性为:web.Language

整型,无法更改,网站一旦创建默认语言就无法再更新,可以通过增加可选语言的方式更改网站的显示语言(注意,网站语言的显示是由客户端浏览器的语言决定的)。


Alternate language(s)部分:

Specify the alternate language(s) that this site will support. Users navigating to this site will be able to change the display language of the site to any one of these languages.

对应的属性为:web.SupportedUILanguageIds

集合类型,可以进行遍历查询,如果需要新增或删除,调用web.AddSupportedUILanguage和web.AddSupportedUILanguage方法。

如添加日语作为可选语言(首次添加时需要将web的IsMultilingual属性更改为true):

web.IsMultilingual = true;
web.AddSupportedUILanguage(1041);

关于语言ID参考此链接:

https://msdn.microsoft.com/en-us/library/cc767443.aspx


Overwrite Translations部分:

User-specified text, such as Title and Description of the site, can be translated into the alternate language(s) supported by the site. Specify whether the changes made to user-specified text in the default language should automatically overwrite the existing translations made in all alternate languages.

对应的属性为:web.OverwriteTranslationsOnChange

布尔类型,设置true或false即可。

以上就是语言设置相关的CSOM属性,可以用来方便地获取与设置网站的语言设置。

相关文章
|
开发框架 JavaScript 前端开发
使用HANA Web-based Development Workbench创建最简单的Server Side JavaScript
使用HANA Web-based Development Workbench创建最简单的Server Side JavaScript
使用HANA Web-based Development Workbench创建最简单的Server Side JavaScript
|
安全
SharePoint Document Library中的"Versioning Settings"功能与CSOM的对应
 博客地址:http://blog.csdn.net/FoxDave SharePoint文档库关于版本的设置:“Versioning Settings”,可以通过CSOM用List对象的一些属性去设置它。
860 0
|
Web App开发
SharePoint Site "Regional Settings"功能与CSOM的对应
博客地址:http://blog.csdn.net/FoxDave SharePoint网站中的区域设置:"Regional Settings",可以用CSOM通过Site的一些属性去设置它。
787 0
SharePoint SC "Audit Settings"功能与CSOM的对应
博客地址:http://blog.csdn.net/FoxDave SharePoint网站集中有个关于审计的功能:"Site collection audit settings",可以用CSOM通过Site的一些属性去设置它。
973 0