Support Forums

Translating the homepage.

Home Forums SimpleCorp Translating the homepage.


This topic contains 57 replies, has 7 voices, and was last updated by  chanyuan 6 months, 1 week ago.

Viewing 15 posts - 1 through 15 (of 58 total)
  • Author
  • #11153


    so I’m having trouble finding a way to translate the homepage content on a few pages I manage.

    They can be found here:

    I’m using the “Poplarware language switcher plugin” which is an outdated / no longer maintained plugin for translating pages / posts etc. It functions by using tags like [lang_en] English goes here [/lang_en][lang_fr] French here [/lang_fr].

    And it’s working perfectly for al my pages / posts, EXCEPT for the dynamically generated homepages of both those sites, which is made up of the “Theme options” tabs within the GUI. If I put those tags in the text areas for those, they show up as plain text, and don’t actually translate anything.

    I was hoping somebody could help me regulate this, preferably while using the same plugin, and perhaps just making a page template of the homepage, and hard-coding the french version myself… but I’m totally uncertain about how to go about this. If you have any ideas how I can accomplish this, please lend me a hand, I’m getting very desperate.

    Thanks in advance.



    I guess ‘your’ plugin does use the po/mo translation file?

    Homepage is a bottleneck since this is NOT part of the whole translation option of the theme.
    Do you have several domains for your languages? If you do I recommend multiple installs.
    If not, we need to hook homepage to the translation option of the theme (po/mo). But you will not be able to add your custom content via Theme Settings > Homepage anymore.

    This one is a popular translation plugin too:




    Thanks for the reply, Guido.

    This is the translation plugin I use, it’s outdated, but pretty solid.

    I do not have several domains, it’s all meant to be on the same address, at

    I was thinking perhaps I could make a page template that’s just the bare-bone structure of the site, and use a page based on the template, (make the theme set to a static page, instead of “most recent posts”), and then just enter the copied / pasted code from the already generated homepage contenet (slider, boxes with pics / text ), and enter those into a page like every other translated page, between the [lang_] tags. This way I could have the images AND text changed upon translation.

    Any thoughts on that ? It sounds similar to the kind of setup I’ll have if I use something like qtranslate, in the sense that I won’t be able to add content through the custom GUI.



    You know, why don’t we remove the 4 text inputfields from the 4 blocks on your homepage and add 4 translatable lines instead? I can do that if you want. That’s all that should be translatable?

    The read more button is already hooked to the translation option of the theme.
    But I notice this one is English at your French site too, do you already have French po/mo translation file? I guess not? Translation files are located in folder languages.

    To create po/mo files in all languages, please use this:




    Sounds intriguing.What do you mean by “you can do that” ?

    I attempted to do what I wanted with po/mo files before, and I had trouble. It was confusing to me and I couldn’t make it work.

    Thanks again for the reply.



    Besides the 4 blocks on homepage there’s also a 404 page, a searchform, etc.
    Those items should be translated too. So that’s why the po/mo files are for.

    I have installed your plugin, I don’t understand how I can create multi language pages? Only notice a plugin settingspage.




    Yeah, this is true… I should probably have those translated as well.

    The plugin works by just inserting the following tags into a post / page:

    [lang_en] English txt goes here [/lang_en][lang_fr] French txt goes here[/lang_fr],

    I’ve been informed by another gentleman from the wordpress.stackexchange that:

    “The plugin you have installed hooks into the_content() function which is called within the post loop on your posts”

    I’m still uncertain of how to work with po/mo files, and if I DO set it up as such, would I have to change any of my already translated content ?

    Thanks again for the reply, Guido. Much appreciated.





    We should try it by adding the French po/mo file into your theme folder ‘languages’ and see if the (for example) read more and 404 are displayed in French.

    If they are, I can work on the 4 boxes on homepage and hook them to the po/mo file as well.

    I can create po/mo file for you so you can upload them to your theme.




    Alright, let’s give this a shot.

    How can I do that ? I’m downloading the codestyling localization plugin now, what next ?



    You can open the plugin via WP Dasboard Extra, look for SimpleCorp, add French language file, index language variables, open language and start translating.

    When you’re done you can press create po/mo.
    Then you should test the site.. If items are in French now, hurrah, I will start working on the homepage boxes.




    I’m not really sure I understand…

    What do you mean open the plugin via Extra ? Also, add what language file ? I’m afraid I’ll need more descriptive instructions.





    After you’ve installed the plugin, you can open the plugin via Extra (Extra is part of your WP dashboard nav).
    When it opens, all theme’s and plugins are listed. Look for SimpleCorp.
    You can push add new language and select French.
    You will notice 3 buttons: edit, read en delete (in you own language)
    Push read so theme will be indexed
    When this is finished you can open French and start tranlating the lines
    Don’t forget to save by pressing create po/mo

    But I can do this too if you want, but not earlier than tomorrow.




    Hey Guido,

    Alright, so I’m able to get as far as “Opening the plugin via extra, and finding / clicking add a new language on SimpleCorp”, but it doesn’t give me any options to edit / read / delete, because it says:

    ERROR: There was an error connecting to the server, Please verify the settings are correct.

    Connection Information
    To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

    But when I enter the FTP info ( which is correct and functional through my FTP client ) it tells me it’s incorrect…..

    Where do I go from here ? I made sure all the directories are 755, and files are 644, as per suggestion of another forum, but it’s still not working.





    Hmm, no idea what happens here.

    You know, I will do the test. Tomorrow.
    You don’t need to have that translation plugin after all, it’s only for creating the po/mo file so we can test if your plugin supports the po/mo files.




    Hm, alright.

    What do you mean you will do the test tomorrow ? Also, I’ve been trying to make a custom home page template, and then just copy and paste the slider / text and everything within the [lang] tags. I’ve tried to make this work using the following code,

    <?php echo do_shortcode(“[lang_en]”); ?> English text <?php echo do_shortcode(“[/lang_en]”); ?>

    But it still shows up in the text box as [lang_en], and doesn’t act as it does within a page or post.

    Any idea how I can accomplish that ?

Viewing 15 posts - 1 through 15 (of 58 total)

You must be logged in to reply to this topic.