Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ivan 139 posts 302 karma points
    Aug 01, 2011 @ 13:06
    Ivan
    0

    Multilingual domain based site: How to access dictionary using umbraco.cms.businesslogic

     

    Hi.

    I have a multilingual domain based site and i want to show a welcome message depending on selected domain language. My template code read as follows:

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>

    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
    <%
        umbraco.cms.businesslogic.member.Member memberLogged = null;
        memberLogged = umbraco.cms.businesslogic.member.Member.GetCurrentMember();
      
        if (memberLogged != null){
          toplogin.InnerHtml = "Welcome <strong>" + memberLogged.LoginName + "</strong> | <a href='/logout.aspx'>Logout</a>";   
        }
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    All i need is quite simple: Show the "Welcome" text inside 'toplogin' element translated to selected domain language. I think i could use umbraco.cms.businesslogic.Dictionary.DictionaryItem but don't know how?

    Thanks in advance for your help!!
    Cheers - Ivan

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Aug 01, 2011 @ 13:26
    Sebastiaan Janssen
    1

    Try umbraco.library.GetDictionaryItem("DictionaryKey");

    Make sure that your site has a domain name and language configured (right click on the root node for that site and choose Host Names. In the Developer section you can define dictionary items.

  • Ivan 139 posts 302 karma points
    Aug 01, 2011 @ 19:40
    Ivan
    0

    Works perfectly ;-)

    Thanks a lot Sebastiaan!!!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies