Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Since LUNA does not natively support multiple languages in the interface, you can make use of Google translate to do this for you. This is not perfect and once you choose a language some features may not work correctly. 

These instructions are for a site/server administrator and will require you to edit some of LUNA's code files. Do this at your own risk and make sure you backup any files you edit.

Step-by-step guide

  1. Go to Google's translate manger  and follow the steps to get the code for your site.  It will look something like this.

    Code Block
    languagexml
    <div id="google_translate_element"></div><script type="text/javascript">
    function googleTranslateElementInit() {
    new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'en,zh-TW', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL, multilanguagePage: true}, 'google_translate_element');
    }
    </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
  2. Edit ~LunaImaging/7.x/LUNA/tomcat/luna_apps/luna.war/WEB-INF/views/jsp/insight/model.jsp and place the code right before the 
    <div id="Content">
    Code Block
    languagexml
     <div id="PageContainer">
        <c:if test="${not empty headerLogo && not empty quickSearch && not empty mainNav}">
            <div id="Header">
                <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
                    <tr>
                        <c:if test="${not empty headerLogo}">
                            <td valign="top" align="left" width="99%">
                                <c:import url="${headerLogo}" />
                            </td>
                        </c:if>
                        <c:if test="${not empty quickSearch}">
                            <td valign="top" align="right">
                                <c:import url="${quickSearch}" />
                            </td>
                        </c:if>
                    </tr>
                    <tr height="46px">
                        <c:if test="${not empty mainNav}">
                            <td valign="middle" colspan="2" class="headerLine">
                                <c:import url="${mainNav}" />
                            </td>
                        </c:if>
                    </tr>
                </table>
            </div>
        </c:if>
        <div id="google_translate_element"></div><script type="text/javascript">
    function googleTranslateElementInit() {
      new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'en,zh-TW', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL, multilanguagePage: true}, 'google_translate_element');
    }
    </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
        <div id="Content">

     


    This will place the menu right under the Menu bar.

    Next you need to eliminate the translator bar at the top of your browser window

  3. Edit ~LunaImaging/7.x/LUNA/tomcat/luna_apps/luna.war/css/structure.css

    Add the following to the bottom of the file

    Code Block
    languagecss
    .goog-te-banner-frame.skiptranslate {display: none !important;} 
    body { top: 0px !important; }


    That's it!