Copied to clipboard

Flag this post as spam?

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


  • Adrian Alexa 50 posts 100 karma points
    Jan 09, 2012 @ 14:23
    Adrian Alexa
    0

    How to set up Language?

    As I have mentioned in my previous post I am new to umbraco. Recieved a project made with umbraco and I try to understand how it works and why is not working :D

    My issue now is that when I change language content will not change on a page except for dictionary item in english.

    This is where the language changes:

        <div id="language_select">
        <div id="current_language">
            <table>
                <tr>
                    <td class="td_img"> <img src="../css/images/flags/gb.png" /> </td>
                    <td> English</td>
                </tr>
            </table>
        </div>
            <div id="available_languages">        
                <form id="ro_lang" onclick='change_lang("ro_lang")' action="/hotelopro-ro.aspx" method="get">
                    <table>
                        <tr>
                            <td class="td_img"> <img src="../css/images/flags/ro.png" /> </td>
                            <td> Romanian</td>
                        </tr>
                    </table>
                </form>
            </div>

    I defined a new dictionary item called SignInText for both languages English and Romanian.

    and in a controler i used to take language like this(after i referenced umbraco library):

    protected void Page_Load(object sender, EventArgs e)

            {
                hypSignIn.Text = umbraco.library.GetDictionaryItem("SignInText");
                hypSignIn.NavigateUrl = "htps://" + HoteloProGenerals.WebAppRootNoScheme + "Login.aspx";
            }

    On the page content is shown when english is selcted correctly but when in in Romanian it shows still in English.

    What do I have to check if everythink is set correct or how can I get current language selected, just to know...?

  • Jeroen Breuer 4909 posts 12266 karma points MVP 6x admin c-trib
    Jan 09, 2012 @ 14:32
    Jeroen Breuer
    0

    You can set a language on a node. Go to the top node of the language and add a hostname (/en or something). You can choose a language there.

    Jeroen

  • Adrian Alexa 50 posts 100 karma points
    Jan 09, 2012 @ 14:40
    Adrian Alexa
    0

    Is this what you mean?

  • Jeroen Breuer 4909 posts 12266 karma points MVP 6x admin c-trib
    Jan 09, 2012 @ 14:42
    Jeroen Breuer
    0

    That is the node that I mean. Right click on Hotelopro RO or Hotelopro EN in the tree and select Manage hostnames in the menu. There you can change it.

    Jeroen

  • Adrian Alexa 50 posts 100 karma points
    Jan 09, 2012 @ 14:46
    Adrian Alexa
    0

    This is weird for me. I don't want the domain to change when I change language.

  • Jeroen Breuer 4909 posts 12266 karma points MVP 6x admin c-trib
    Jan 09, 2012 @ 14:53
    Jeroen Breuer
    0

    Hmm perhaps it's already used somewhere else. You can also try something like hotelpro.com/en (as long as it isn't used yet) and set the language.

    Jeroen

  • Adrian Alexa 50 posts 100 karma points
    Jan 09, 2012 @ 14:58
    Adrian Alexa
    0

    Ok, thanks. It seams that now it is taking the language just as it has to ;)

    If you have time please take time to see my other issue in previous post, Regards

  • 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