calling the current language code

dev.xiligroup is being renovated Forums xili-language plugin calling the current language code

This topic contains 0 replies, has 2 voices, and was last updated by  Anonymous 8 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2906

    Anonymous

    Thanks for your question and circumstantial notes. Documentation is a hard work and now after more than three years of versioning, i know it is a goal to rewrite it totally… but the time is not yet here…

    Question: is the image (filename) attached to a post or attached to a block in the theme itself? In each case a solution exists

    For the question about Archive : can you open a topic and precise what you observe ?

    #2908

    Anonymous

    The file is in the header and I’d like to put the current language name into the filename of this block.

    <h1 id="blog-title"><span><a>/<?php if(function_exists(xiliml_get_language)) echo xiliml_get_language($lang_nameorslug=""); ?>" title="<?php echo wp_specialchars( get_bloginfo('name'), 1 ) ?>" rel="home"><img src="<?php bloginfo('url'); ?>/wp-content/themes/sandbox-child-haft2know/images/haft2know_header-[NEED CURRENT LANGUAGE HERE].png" title="<?php bloginfo('name') ?> | <?php bloginfo('description') ?>"></a></span></h1>

    I also tried to call xiliml_get_language as you can see, but it doesn’t return the ?lang=en_us or fr_fr that it should when in those languages. It doesn’t return any errors! Pls. help! Thanks!

    Archive months are not translating:

    http://haft2.com/excelsior/

    And they return ALL posts in ALL languages.

    (I’m using a child theme of the Sandbox theme.)

    Thanks!

    #2909

    Anonymous

    the function the_curlang() function normally give you ‘en_us’ or ‘fr_fr’ string… and not the full object of current language (print_r() show resulst – and not echo –

    for archives :

    wp_get_archives(‘..your.vars..&lang=fr_fr’)

    or

    wp_get_archives(‘..your.vars..&lang=’) to display current

    see also https://dev.xiligroup.com/?p=1432 and naturally read the plugin code source…

    #2911

    Anonymous

    Sorry, but I don’t know how to get that to work, your documentation is hard to follow. Can you show me what I need to do to get the archive months translating with Fr_fr slugs in the URLs?

    I keep going over the info online, I just can’t seem to firgure it out. I really appreciate the help!

    #2920

    Anonymous

    Thanks, sorry, I forgot to post I was successful with the the_curlang() function! It’s the difficulty I have been having with the article listing that has me stumped. I have tried replacing the usual wp_get_archives function call in the sidebar.php and nothing changed (or would show, even without archive widgets active).

    Thanks for your help so far. I know I’m getting close!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.