Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Can you use PHP in default.master.tpl?

124»

Comments

  • chanhchanh ✭✭

    I wrote a Smarty plugin call "autotranslate" and put in my PHP code.

    It works well with VBS3, Baseline, and Bitter Sweet but not with bootstrap them.

    When I use bootsctrap them, the translated text of the nav bar all mess up.

    Here is a sample of what it looks like
    http://uhostetc.com/

    Please take a look and let me know what you think.

    Thanks

  • I thin your problem is pagespeed or minify..

  • chanhchanh ✭✭

    The menu bar instead of space out nicely like the original site but rather it all stick together on the translated site.

    I am not sure I understand what you mean about pagespeed or minify comment.

    Thanks

  • x00x00 MVP
    edited April 2014

    can you describe more clearly what you are talking about? And still start a new discussion.

    grep is your friend.

  • chanhchanh ✭✭

    I uploaded two files one if after it is translated and one is the original site and as you can see the translated site the menu get compress together where the original site space out evenly when use with bootstrap theme.

  • I'm not replicating that so maybe browser specific.

    grep is your friend.

  • chanhchanh ✭✭
    edited April 2014

    I am not using bootstrap theme now. I will turn on so you can see it for yourself.

    Click on any language of your choice and you will see how the menu look.

  • You have not specified any character encoding. This is very important. I suggest utf-8

    grep is your friend.

  • chanhchanh ✭✭

    The bootstrap theme has it but the translate does not work.
    < meta charset="utf-8" >

    It works fine on other theme but bootstrap them.

  • <meta http-equiv="content-type" content="text/html;charset=UTF-8">

    grep is your friend.

  • chanhchanh ✭✭

    I add the code you suggest but make no different.

  • It won't translate for me... sends me to google translate page and never loads...

    To fix the menu items after translation, you need to add some css. Add margin so they have space between them,

  • add this to your custom.css

    @media (min-width: 768px)
    .navbar-nav > li {
    float: left;
    margin-right: 6px;
    }
    
  • chanhchanh ✭✭

    It works for me whenever I click on the language that I want to translate.
    What do you actually see?

    It makes no different on the css changes that you suggested.

    Thanks

  • It sends me to google translate, it is a bug with these, sometimes it does it on the same page other not...the page takes forever to load.

    the css looks like it is working for me . I do not see it all bunched up as before.

  • chanhchanh ✭✭

    I force the translated page to a new windows or tab depend on your browser setting.

    no, it is working because I change theme to VBS3 not "bootstrap" any longer.

Sign In or Register to comment.