Results 1 to 1 of 1

Thread: manage singular plural in the result of the search bar (french exemple)

  1. #1
    Thread Starter
    Expired Customer abciweb's Avatar
    Join Date
    Aug 2013
    Location
    France
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    manage singular plural in the result of the search bar (french exemple)

    "search.php" file original code :
    ...
    PHP Code:
    <h1 class="single dotted"><?php printf__'Search for \'%1$s\' returned %2$s results'APP_TD ), $searchTxt$wp_query->found_posts ); ?></h1>
    ...


    new code with singular plural :
    ...
    PHP Code:
    <h1 class="single dotted"><?php printf(_n('Search for \'%1$s\' returned %2$s result''Search for \'%1$s\' returned %2$s results'$wp_query->found_postsAPP_TD),$searchTxt$wp_query->found_posts)?></h1>
    ...

    Of course you need to update your files .po / .mo with poedit

    Translation settings required to configure poedit:
    - champ "propriété du catalogue > propriété de traduction > formes plurielles :
    Code:
    nplurals=2; plural=n > 1 ? 1 : 0;
    - champ "propriété du catalogue > Mots clés source, ajouter la ligne :
    Code:
    _n:1,2
    (si elle n'est pas présente)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. when try to search get no result !!!
    By akashkash in forum ClassiPress General Discussion
    Replies: 1
    Last Post: August 9th, 2013, 04:05 AM
  2. Hide result about search
    By dario06 in forum ClassiPress General Discussion
    Replies: 9
    Last Post: April 2nd, 2012, 02:59 AM
  3. Hide result about search
    By dario06 in forum Report ClassiPress Bugs
    Replies: 4
    Last Post: March 24th, 2012, 12:11 PM
  4. singular statement of active and unreliable coupons
    By freshjustin in forum Report Clipper Bugs
    Replies: 1
    Last Post: October 23rd, 2011, 11:46 AM