I am having trouble with my Wordpress site and I posted this question on the Wordpress support forum a week ago but have got no responses, so I hope I have better luck here as I really need a solution.

I've built a WordPress website in English and now I need to change it all to french, so I did some searching and followed the steps to change the language in the wp-config file (using the .mo file), and for the most part it worked well, except that some parts of the website were left in English. For instance, the search results page. If you search for something and it finds nothing, the whole "Nothing found" message is in English. The 404 page is also still English, along with a few other small areas around the website.

How do I go about getting these areas translated like the rest?
I'm using a Twenty-Thirteen child theme and Wordpress 3.7.1 if that helps, and I have not modified the areas that didn't get translated.

Thanks in advance.

4 Years
Discussion Span
Last Post by T4gal

How do I go about getting these areas translated like the rest?


I'm not familiar with Wordpress but I think you need to update the WordPress platform not the template itself.

Maybe some other Daniweb member can confirm with that.

I leaning towards the WordPress Platform that is in French.


I'm not sure what you mean by updated the platform and not the template? As far as I know, the changes I made were not made to the template. I uploaded the appropriate .mo file to "wp-content/languages" and then changed the "define('WPLANG', 'xx_XX')" line in wp-config.php.

Maybe I'm misunderstanding something?


Those areas of text that did not translate are most likely static in the theme files, which is why they didn't translate. The only option would be to open those files that are part of the theme and find those areas of text that need to be changed and then change them manually.


I've tried to find them in the theme and unfortunately was unable to. A Dreamweaver search found nothing in the theme files.


I'm still looking for a solution to this. Any ideas?


I took a look at the Twenty-Thirteen theme and it is calling this for no results get_template_part( 'content', 'none' );

What this is doing is using code from another file to be displayed if the results comeback with nothing.

The file that it is using in this case is content-none.php.

It appears that you will need to manually translate the output in this file.


Ok, thank you very much! I couldn't find the file it was calling before so that fixes my problem!

Unfortunately now I have a new problem. Now that I have manually translated the file, it isn't properly displaying the special French characters. It's just displaying question marks. From what I've found on Google, it should be displaying them properly, but I know very little about this so I could be wrong.

Here is the link if that helps:

Should I be starting a new thread for this new problem?


That sounds like something is not UTF-8 compliant. The site charset set to UTF-8, but that doesn't mean the DB has been set correctly. Did you change this in the file by downloading and changing it in something like notepad? Or did you change it through the Wordpress admin UI?

If you download the file, does it show the characters correctly in there still, or are they question marks there as well?


I have not changed anything to do with the charset as far as I know. I apologize, I'm completely new to dealing with special characters.

I tried doing a "Save page as..." and then viewing the saved file in my browser. Is this what you mean by downloading the file? When I view the saved file in my browser the characters are still displaying as question marks.


You had made the changes to the file content-none.php

If you download this file from the web server using FTP, how do the characters look there?

I am assuming that you probably changed the file through the Wordpress Admin UI if you didn't use FTP to access the file.


Oh okay, thank you for clearing that up. I am making the changes to the files through FTP, using Dreamweaver. This is what I see when I download and open the content-none.php file. Is this what you mean or am I still misunderstanding something?

 * The template for displaying a "No posts found" message
 * @package WordPress
 * @subpackage Twenty_Thirteen
 * @since Twenty Thirteen 1.0

<header class="page-header">
    <h1 class="page-title"><?php _e( 'Rien trouvé', 'twentythirteen' ); ?></h1>

<div class="page-content">
    <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>

    <p><?php printf( __( 'Prêt à publier votre premier poste? <a href="%1$s">Commencez ici</a>.', 'twentythirteen' ), admin_url( 'post-new.php' ) ); ?></p>

    <?php elseif ( is_search() ) : ?>

    <p><?php _e( 'Désolé, mais rien ne correspond à vos critères de recherche. S&rsquo;il vous plaît réessayer avec d&rsquo;autres mots-clés.', 'twentythirteen' ); ?></p>
    <?php get_search_form(); ?>

    <?php else : ?>

    <p><?php _e( 'Il semble que nous ne pouvons pas trouver ce que vous cherchez. Peut-être la recherche peut aider.', 'twentythirteen' ); ?></p>
    <?php get_search_form(); ?>

    <?php endif; ?>
</div><!-- .page-content -->
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.