in

SharePoint University

Clean slate. Nothing but SharePoint.
Go, SharePoint!

Fixed link in masterpage in a multilingual environment

Last post 01-14-2008 2:51 AM by bubblez. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-29-2007 12:19 PM

    Fixed link in masterpage in a multilingual environment

    Hi,

    I'm trying to place some "hard-coded" links on a masterpage in a multi-language sharepoint environment. The masterpage should be used for different SiteCollections everywhere in the hierarchy, not only root-sites. The links are used for sitemap, contact, downloads etc.

    Example:
    English -> http://myserver/somesitecollection/en-US/someweb/Pages/sitemap.aspx

    German -> http://myserver/somesitecollection/de-CH/someweb/Seiten/sitemap.aspx

    How can i generelly build the link in my masterpage? I played around with the SPLinkButton-Control. My biggest problem is the "Pages"-directory. I tried with resources:

     <SharePoint:SPLinkButton 
            NavigateUrl="<%$SPUrl:~SiteCollection/~language/%><% $Resources:MyOwnResources, sitemap_link %>"
            Text="<%$Resources:By1eEuropeResources, sitemap %>"
            runat="server" />

    where the string Pages/sitemap.aspx can be found under sitemap_link in my res-File.It seems,l that SPUrl and Resources can't be mixed in the same property of a control.

    The render result is an empty href-Property.

    Is there another way to realize that without 2 masterpages for 2 different panguages.

    Thanx in advance
    Nicolas

  • 10-27-2007 1:08 PM In reply to

    Re: Fixed link in masterpage in a multilingual environment

    i am sorry , i am not able to answer your query,

    i need help from you,

    i have made one team site completly , now how to make this site work with other languages like japneese.

     

    Please i am despreatly looking for help.

    as i don't want to create that site again in japneese.

  • 10-30-2007 2:20 AM In reply to

    Re: Fixed link in masterpage in a multilingual environment

    Dear samarsalica,

    To build multilanguage sites You need to install the language pack(s) for the desired language(s) and set up variations. You'll find a lot of tutorials on the internet.

    Regards

  • 01-04-2008 5:23 AM In reply to

    Re: Fixed link in masterpage in a multilingual environment

    i have the same problem. any ideas out there? 

  • 01-12-2008 11:31 PM In reply to

    Re: Fixed link in masterpage in a multilingual environment

    when i open sharepoint designer in a place that designer cant find any masterpage, designer warning to me and say: "I cant find any masterpages, find it" and show me the button that wrote on it:"Browse"

    i Browse the master page in another location but designer cant link this to that and say me:"copy that masterpage in target location.

    =? => perhaps we copy that master page from destinition to target and when it modified workflow copy it to second location

    search saber tabatabaee
  • 01-13-2008 3:58 AM In reply to

    Re: Fixed link in masterpage in a multilingual environment

    You could achieve this by creating a custom control. You would use it like <MyControl:SitemapLink runat="server" />. In the CreateChildControls method you would create the URL:
    PublishingWeb pWeb = PublishingWeb.GetPublishingWeb(SPContext.Current.Web);
    string urlPart = String.Format(CultureInfo.CurrentCulture, "{0}/{1}", SPContext.Current.Site.Url, pWeb.Label.Title);

    Then you would need to it the coed to obtain the resource string: as I'm typing the code right now I don't know it exactly and wouldn't like to give you wrong example.

    Then in the Render method you would do:
    writer.Write(String.Format(CultureInfo.CurrentCulture, "<a href=\"{0}\">Sitemap</a>", navigateUrl));

     It's maybe not as simple as using the SPLinkButton but it would provide with any flexibility you want: combining resources and setting the URL as well.

    Waldek Mastykarz
    http://blog.mastykarz.nl
    http://codeplex.com/tmt
  • 01-14-2008 2:51 AM In reply to

    Re: Fixed link in masterpage in a multilingual environment

    I recently found the property "List_Pages_UrlName" in the cmscore.resx. That contains the Pages or Seiten string...But i can't either use it in combination with other tags in the same attribute... just that you know that you must not build your own resourcefile with this strings ....

Page 1 of 1 (7 items)

Need SharePoint Training? Attend a SharePoint Bootcamp!
Forum content (c) original posters. Everything else (c) 2008 SharePoint Experts, Inc.