WordPress.org

Forums

How to create dual language blog (5 posts)

  1. toeoda
    Member
    Posted 5 years ago #

    I want to have a dual language blog, not necessarily all posts will be identical, but most likely majority are.
    for readers convenience I would like to have a language switch button, so information would be displayed only in preferred language.
    Is it possible to do with wordpress? And if yes, could you point me in the right direction how to achieve it and perhaps a few examples.
    Sincerely yours.

  2. Nick Wingfield
    Member
    Posted 5 years ago #

    Hi Toeoda

    I haven't any answers, I'm afraid.

    I'm just writing to say that I was just about to post exactly the same question.

    Let's hope someone out there can help us!

    Nick

  3. Samuel B
    moderator
    Posted 5 years ago #

  4. Nick Wingfield
    Member
    Posted 5 years ago #

    Thanks Samboll

    I've now installed qTranslate. It's almost perfect ...

    BUT ...

    What I need to make it perfect is for the header to change with each language.

    My header is just a gif. Currently it is determined by this line of code in style.css in my customised theme:

    #header {
    	background: url(images/header.gif);
    	margin: 0;
    	padding: 0px;
    	height: 130px;
    	width: 974px;
    
    	}

    Correct me if I'm wrong but it doesn't look like qTranslate can change the header. Is there any other dual language plug-in that can do that?

    Or is the only alternative for me to create two completely separate WordPress sites each with their own subdomain name, both linked to a standard html frontpage which is independent of WordPress. And if I did this, would I have to buy a separate MySQL database for each of the two sites?

    Excuse my ignorance - but I'm still a web novice

    Cheers

    Nick

  5. nouveller
    Member
    Posted 5 years ago #

    Personally I'd use: http://wordpress.org/extend/plugins/sitepress-multilingual-cms/ I found it much more stable as it didn't use so much post filtering and JavaScript.

    If you were to use WPML (the plugin I just posted a link to) you could do something like this.

    In your <head> tag:

    <style>
    
    #header { background: url(images/<?php echo ICL_LANGUAGE_CODE; ?>.gif); }
    
    </style>

    The constant 'ICL_LANGUAGE_CODE' is the currently selected langauge, the two letter language code to be precise.

    So say if you had a French option, the ICL_LANGUAGE_CODE would be 'fr'.

    Giving you:

    <style>
    
    #header { background: url(images/fr.gif); }
    
    </style>

    Then simply name your images that you want to change after the two letter language codes.

Topic Closed

This topic has been closed to new replies.

About this Topic