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 ...
随机推荐
- python2.x编码问题实例
1,编码问题,主要是区分面向人类的字符串,面向计算机的字节序列 在python3中,字符串是str(默认即unicode),字节序列是bytes 在python2中,字符串是unicode,字节序列是 ...
- 20190102xlVBA_多表按姓名同时拆分
Sub 多表按姓名同时拆分20190102() AppSettings Dim StartTime As Variant Dim UsedTime As Variant StartTime = VBA ...
- drf 认证、权限、限流、过滤、排序、分页器
认证Authentication 准备工作:(需要结合权限用) 1. 需要使用到登陆功能,所以我们使用django内置admin站点并创建一个管理员. python manage.py creates ...
- php中Redis的扩展
首先要下载 php_redis.dll 和 php_igbinary.dll 在官网(https://windows.php.net/downloads/pecl/snaps/redis/3.1.4/ ...
- 【洛谷p2822】组合数问题
(突然想 ??忘掉了wdt) (行吧那就%%%hmr) 组合数问题[传送门] (因为清明要出去培训数学知识所以一直在做数论) 组合数<=>杨辉三角形(从wz那拐来的技能 ...
- 进程锁,队列,JoinableQueue
内容梗概: 1.进程同步(锁) 2.队列(重点) 3.生产者消费者模式 4.JoinableQueue([maxsize]) 5.信号量(了解) 6.事件 1.进程同步(锁) 并发编程让我们能更加充分 ...
- loj#528. 「LibreOJ β Round #4」求和
求:\(\sum_{i=1}^n\sum_{j=1}^m\mu(gcd(i,j))^2\) 化简可得\(\sum_{i=1}^{min(n,m)}{\lfloor \frac{n}{i} \rfloo ...
- 【IDEA】【2】创建Maven项目及部署发布
正文: 1,我参考的文档1已经比较全面了,需要注意的是界面可能有点不一样,有些地方需要自己注意一下 2,project和model的概念:挺困扰人的,我目前没有多模块开发,开发多个项目的时候是开了多个 ...
- oracle 12c新特性 FETCH FIRST、WITH TIES 关键字详解
几乎都是官方文档上的内容. [ OFFSET offset { ROW | ROWS} ] [ FETCH { FIRST | NEXT }[ { rowcount | percent PER ...
- 解决jar包依赖:Spring IO platform推出bom
名词解释: BOM(bill of materials):材料清单,用于解决jar包依赖的好方法. Spring IO Platform 缘起:Spring起初只专注ioc和aop,现在已发展成一个庞 ...