SharePoint online Multilingual support - Development(1)
private static void CreateCustomList(ClientContext ctx, Web web)
{
ListCollection listCollection = ctx.Web.Lists;
ctx.Load(listCollection, lists => lists.Include(list => list.Title).
Where(list => list.Title == "LocalizeMe"));
ctx.ExecuteQuery();
// Create the list, if it's not there...
if (listCollection.Count == 0)
{
ListCreationInformation newList = new ListCreationInformation();
newList.Title = "LocalizeMe";
newList.QuickLaunchOption = QuickLaunchOptions.On;
newList.TemplateType = (int)ListTemplateType.GenericList;
newList.Description = "LocalizeMe sample list";
List list = web.Lists.Add(newList);
ctx.ExecuteQuery();
}
}
private static void LocalizeSiteAndList(ClientContext cc, Web web)
{
// Localize site title
web.TitleResource.SetValueForUICulture("en-US", "Localize Me");
web.TitleResource.SetValueForUICulture("fi-FI", "Kielikäännä minut");
web.TitleResource.SetValueForUICulture("fr-FR", "Localize Me to French");
// Site description
web.DescriptionResource.SetValueForUICulture("en-US",
"Localize Me site sample");
web.DescriptionResource.SetValueForUICulture("fi-FI",
"Kielikäännetty saitti");
web.DescriptionResource.SetValueForUICulture("fr-FR",
"Localize to French in description");
web.Update();
cc.ExecuteQuery(); // Localize custom list which was created previously
List list = cc.Web.Lists.GetByTitle("LocalizeMe");
cc.Load(list);
cc.ExecuteQuery();
list.TitleResource.SetValueForUICulture("en-US", "Localize Me");
list.TitleResource.SetValueForUICulture("fi-FI", "Kielikäännä minut");
list.TitleResource.SetValueForUICulture("fr-FR", "French text for title");
// Description
list.DescriptionResource.SetValueForUICulture("en-US",
"This is localization CSOM usage example list.");
list.DescriptionResource.SetValueForUICulture("fi-FI",
"Tämä esimerkki näyttää miten voit kielikääntää listoja.");
list.DescriptionResource.SetValueForUICulture("fr-FR",
"I have no idea how to translate this to French.");
list.Update();
cc.ExecuteQuery();
}
简单说明一下,对于需要国际化的内容,我们需要获取对应的SharePoint Object之后,操作相应的XXResource属性,如上所示,对Site和List的Title和Description进行了国际化。
SharePoint online Multilingual support - Development(1)的更多相关文章
- SharePoint online Multilingual support - Development(2)
博客地址:http://blog.csdn.net/FoxDave 上一节讲了如何通过Code的方式设置Site和List级别的国际化,本节介绍一下如何设置Content type和Site co ...
- SharePoint online Multilingual support - Settings
博客地址:http://blog.csdn.net/FoxDave This post will talk about how to enable sharepoint online site mul ...
- Multi-lingual Support
Multi-lingual Support One problem with dealing with non-Latin characters programmatically is that, f ...
- SharePoint Security and Permission System Overview
转:http://www.sharepointblues.com/2010/09/01/sharepoint-security-and-permission-system-overview/ Shar ...
- 10 Skills Every SharePoint Developer Needs
10 Skills Every SharePoint Developer Needs(原文) This blog post guides you through the essential skill ...
- SharePoint 2013 搜索功能,列表项目不能完全被索引
描述 最近一个站点,需要开启搜索功能,然后创建内容源,开始爬网,发现列表里只有一部分被索引,很多项目没有被索引,甚是奇怪,如下图(其实列表里有80几条项目). 首先爬网账号是系统账号.服务器管理员,所 ...
- Device Channels in SharePoint 2013
[FROM:http://blog.mastykarz.nl/device-channels-sharepoint-2013/] One of the new features of SharePoi ...
- INCOIN Importing Multilingual Items (Doc ID 278126.1)
APPLIES TO: Oracle Inventory Management - Version: 11.5.9 to 11.5.10.CU2 - Release: 11.5 to 11.5 GOA ...
- [IT学习]微软如何做网站内容治理
How Microsoft does SharePoint Governance for their internal platform english sources from:http://www ...
随机推荐
- MP4介绍与基本AVC编码(x264)教程
MP4介绍与基本AVC编码(x264)教程(最后更新: 2006.03.25)为日益增加的对MP4 H264/AVC编码的需求,本人做了一个简单的MP4介绍与基本AVC编码(使用x264)教程最后更新 ...
- 20170920xlVBA_FTP_UpDownLoad_DownLoad
'建立应用环境进程 Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpen ...
- test example
#coding=utf-8 import os import caffe import numpy as np root='/home/xxx/caffe/' #根目录 deploy=root + ' ...
- 跨域和jsonp的原理
什么是跨域? 跨域,指的是浏览器不能执行其他网站的脚本.它是由浏览器的同源策略造成的,是浏览器对JavaScript施加的安全限制. 所谓同源是指,域名,协议,端口均相同,不明白没关系,举个栗子: h ...
- 廖雪峰网站:学习python函数—函数参数(三)
1.*args # 位置参数,计算x2的函数 def power(x): return x * x p = power(5) print(p) # 把power(x)修改为power(x, n),用来 ...
- java多线程wait()方法必须放在while循环里面的原因探析
1.写一个包子生产消费案例:一次生产或消费一个包子,有包子就消费,没有就生产.(部分代码参考传智播客刘意2015Java基础视频讲义) 1.1 写一个Baozi.class,包含main()方法,用来 ...
- python-day97--git协同开发
1.协同开发流程 - 在dev的基础上创建三个开发的分支 -每个人都在自己的分支中进行开发 -第一个人开发完成之后把review分支从云端版本库中拉下来 -将个人的分支与review分支合并(确保re ...
- PAT 1005 Spell It Right
1005 Spell It Right (20 分) Given a non-negative integer N, your task is to compute the sum of all ...
- Space Ant
Space Ant The most exciting space discovery occurred at the end of the 20th century. In 1999, scient ...
- 连接zookeeper+solr的服务器超时
在连接zookeeper+solr的服务器超时,如果检查各ip地址都没有变动,各部分工程也没有书写问题,那么连接超时,就可能是该服务器内存分配过少,性能不足的问题,扩大该服务器内存即可.