calling the current language code

dev.xiligroup est en travaux Forums xili-language plugin calling the current language code

Ce sujet contient 0 réponses et 2 voix, et a été mis à jour par  Anonyme il y a Il y a 12 ans, 11 mois.

Visualisation du message 5 (1 sur 5, 5 au total)
  • Auteur
    Articles
  • #2906

    Anonyme

    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

    Anonyme

    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

    Anonyme

    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

    Anonyme

    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

    Anonyme

    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!

Visualisation du message 5 (1 sur 5, 5 au total)

Vous devez être connecté pour répondre à ce sujet.