Forums

qtranslate and functions (10 posts)

  1. eedavidee
    Member
    Posted 2 years ago #

    my page on: http://www.cokc.biz/blog/

    down on the bottom left part in the footer i am trying to use the function list page to get the title and then when another language is selected, the list of pages to apper in the language, including the title.

    at the moment i am using qtranslate, and the output is both titles - in all languages available, for me - english and chinese. is there a way to specify which language to use?

    i hope you cna help me, been trying to do that forever,

  2. vladimirtomko
    Member
    Posted 2 years ago #

    If i uderstood what you meant, then I believe you should define your blog name using qTranslate short tags (Admin panel - Settings - General Settings), for example, I have Latvian and Russian languages, so my blog title looks line this:
    [:lv] Student life - tavas dzīves garša [:ru]Student life - вкус твоей жизни
    Yours I believe should look like this then:
    [:en]Ultra Premium Wine [:cn]珍藏级葡萄酒
    P.S. I'm not sure if Chinese language short tag is [:cn], you can look it up yourself in qTranslate.
    I hope this helps you. )

  3. eedavidee
    Member
    Posted 2 years ago #

    i believe i am also using the shorttags because my pages use the style:

    <!--:en-->ReDark 2005<!--:--><!--:zh-->红与黑珍藏干红葡萄酒 2005<!--:-->

    but thats in Control Panel - pages - edit

    but now when i use the title for a list, such as the one i want to make in the footer, how do i specify which one to be published, so when the customer changed the language, the list will change all in chinese, for example?

  4. vladimirtomko
    Member
    Posted 2 years ago #

    It works this way, when it's rendered via HTML, but if you wish your page title to appear so - you need to use those tags i've mentioned, try using this way:
    [en:]ReDark 2005[zh:]红与黑珍藏干红葡萄酒 2005

    For you footer, well, you can hard code it, make each option in <!--:en-->link 1<!--:--><!--:zh-->link 1 in chinese<!--:--> tags, this way it will switch, when you are switching languages.
    Or you can insert a code in your footer, that will take text from a page with certaint id, where you can make english and chinese variants, style it appropriate and then exclude this page from appearing in your menu or so.

  5. eedavidee
    Member
    Posted 2 years ago #

    i tried what you suggested but it does not work and it messes up my page names

  6. vladimirtomko
    Member
    Posted 2 years ago #

    Well, then I think you'll have to hardcode it :/.

  7. eedavidee
    Member
    Posted 2 years ago #

    is there a way to make one footer for chinese pages and one for english pages and if yes, how?

  8. eedavidee
    Member
    Posted 2 years ago #

    just one more question on qtranslate and integrating it with other functions.

    if i have the following:

  9. <h3><?php _e("<!--:en-->Shopping<!--:--><!--:zh-->shopping-chinese<!--:-->"); ?></h3>
  10. can i add a link for each of the languages?

    so if it is english to link to one page and if used the zh (chinese) to link to other page(the chinese version of the same page as it links from english)

    hope anyone can help

  • wissamharoun
    Member
    Posted 2 years ago #

    I'm going to jump in here with a slightly similar question.

    I'd like to present 2 languages on the same page, side-by-side: Our design is intended to be "4 column" meaning, on the extreme left, there is an English menu showing page links, right of that, there is English content, right of that there is the equivalent Arabic content in RTL, and on the extreme right, there is the Arabic menu showing page links (also in RTL).

    So, knowing that qtranslate functions by storing the multiple languages in the same database record for the post, and isolates the content with the special tags, how do we invoke both languages onto the SAME page, at the SAME time??

    Many Thanks,

    wissam

  • wissamharoun
    Member
    Posted 2 years ago #

    anybody ?

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags