Detect page library in all languages

Brass Contributor


we are doing dvt for SharePoint Online using CSOM.

We are creating pages in existing sites and we have an environment where our code is not working.

The language is portuguese and we are not finding the SitePages library.

Instead, we have  a library named  Paginas and the relative URL is also /Paginas instead of SitePages.

This does not match all the logic we had develop to discover existing SitePages or Publishing Pages.


Question:  What reliable way can we use to find the existing SitePages or Publishing Pages in all languages.

If the answer is to maintain a list of all languages, can you please point us to such list (Note we do not have any on prem sharepoint server where we could dump a resource file).


if (list.BaseType == BaseType.DocumentLibrary && ( list.BaseTemplate == (int)ListTemplateType.WebPageLibrary || list.BaseTemplate == 850))
if (list.EntityTypeName == "SitePages" || list.EntityTypeName == "Pages")

********  Not working also. Here the entityTypeName is also Paginas **********



0 Replies