c# - How to localize SharePoint publishing page title -
how 1 localize page title of sharepoint publishing page? provisioning like:
publishingpage newpage = publishingweb.getpublishingpages().add("mypage.aspx", "mylayout.aspx"); newpage.title = "$resources:myresx,mypage_pagetitle"; newpage.update();
when provision page, title shows literally, $resources:myresx,mypage_pagetitle
, instead of sharepoint looking string. so, guess assumption wrong sharepoint string up. or have syntax wrong.
i referencing myresx
in other places; sure resource file / string accessible.
i have exact same issue webpart titles well, unified solution exists both scenarios.
try sputility.getlocalizedstring:
newpage.title = sputility.getlocalizedstring( "$resources:mypage_pagetitle", "myresx", web.language);
Comments
Post a Comment