Episode #2 – Creation of a multilingual website with xili-language

Review of previous steps

In the previous post, some important steps were defined. This post follows also the series about child theme.

The step by step is a little bit different – a child theme is now available:

  1. WordPress 3.0 installation
  2. Check that theme “twentyten” is in theme folder and add theme “twentyten-xili” :

    For xili-language 2.1.x, You must use updated twentyten-xili-v1.1 of twentyten-xili.
    twentyten-xili theme 1.0 for xili-language 1.8.9.1

    downloadable here (45kB) [Updated v 0.9.9 + japanese]. Twentyten-xili must be set as current theme like here in this website

  3. Add the file .po and .mo of target languages (here fr_FR, de_DE and es_ES)

    Can be found in sub-folder languages of theme’s folder named twentyten of each kit as below.
    http://es.wordpress.org/
    http://fr.wordpress.org/
    http://de.wordpress.org/
    COPY the .mo and .po files for each languages in sub-folfer ‘langs’ of CHILD theme twentyten-xili (the original will not be modified).

    The theme folder will be similar to this:

    themes folder with parent and child

    themes folder with parent and child

  4. Enabling plugins Xili-language (choice of languages) and Xili-dictionary
  5. Creating a category – such as “Actualités” then “News” and its description (“Recent news about website) BECAUSE the pivot language is English.
  6. Writing of one or two articles in French and / or English – we will learn to link if their content is the translation – adaptation of the other.
  7. Adding widgets Xili-specific language – settings…
  8. Customizing the new menu system of the header (wp_nav_menu)
  9. Contents of Navigation menu
  10. Tags and plugin Xili-tidy-tags.

Steps 1 to 6 are easy, but we will spend time at step 4 and 6. The sixth because there are some useful tips for authors in multilingual context.
The screenshot are done during this current article – the first in english and his translation in french.

Adding new post

Adding new post

Because, I currently write the both version, I will open a new tab in the browser by clicking Add New at french line in Linked posts box at left (I use right button of the mouse and select ‘Open link in new tab’) .

In the new tab, we see that all box at left are set. French title is added and body text…

edit post: french side

edit post: french side

After full editing and saving, when post displayed as single the terms around this are translated according language of the displayed post.

meta sub-title in english

meta sub-title in english


les infos traduites

les infos traduites

At next step, we will see how to complete the translation for terms as in categories or menus or description…

This entry was posted in How to and tagged , , , , . Bookmark the permalink.

33 Responses to Episode #2 – Creation of a multilingual website with xili-language

  1. Pingback: Episode #3 – Completing multilingual translations of theme with DB items | xili-plugins for multilingual sites

  2. Pingback: xili-language plugin: Creation of a multilingual website with WordPress 3.0 and his new theme twentyten | xili-plugins for multilingual sites

  3. Alexandre Blondin Massé says:

    Hello !

    I’m currently redesigning my personal website so that it offers both an English and French version of my curriculum, interests, etc. (I’m a Ph.D student). Of course, I’m using WordPress and I started using your twentyten extension. This works great and I’ve been able to solve all my problems except this one: How can I change the “Home” link in the menu so that it redirects to the English version of my posts while the “Accueil” link (the French one) redirects to the French version of my posts? Right now, it seems we need to choose one static home page.

    Thank you for the answers!

    Alex

  4. dev xiligroup says:

    Before to answer, just a question :
    do you need a current home – as here at home with the most recent posts – or do you need a page in each language like in dev.xiligroup.com website ?

    • Alexandre Blondin Massé says:

      Hi !

      Thank you for the quick answer and sorry about mine being late… To answer your question, I would like my home page to display the most recent posts, but in the language chosen by the user. In particular, your website I’m posting on doesn’t satisfy what I would like to have.

      I’ll try to be clearer. Right now, when I get to my home page, it’s in French, which is ok. If I click on the USA flag (which allows me to display the English version), the home page is still displayed, but in English, which is ok. On the other hand, if I click on the “Home” button at that moment, it goes back to the French version. This is what I would like to change. When I’ve chosen English, I want the “Home” button to get me to the English version of my home page, which contain the most recent posts.

      Is is more understandable?

      Thank you for your help!

  5. dev xiligroup says:

    Thanks for your explanation. xili-language is extraordinarily flexible but it depends if you use current theme like twentyten with nav menu and if you are able to use php to modify some tags in your theme or to add some api in your functions.php.
    With a front-page as page on home as in dev.xiligroup no php needed, only a page for each language.
    What have you set on dashboard xili-language settings for home page ? language of visitor browser ?
    With home as list (index.php or home.php), the solution is not yet trivial without php knowledge (few lines to add) or with current nav menu as used by enduser. (A new checkable feature is in roadmap).
    Tell me what approach you want… and you will find a pretty solution.

    Michel

  6. dev xiligroup says:

    Because you use nav menu tools of twentyten theme, and because the home item in this menu is built after the menus settings in Appearance., a simple series of php conditional lines is not possible like in current theme using template tags or links. Latest version 1.8.9.2 – http://wordpress.org/extend/plugins/xili-language/download/ – includes a new checkbox in nav menu fieldset of special metabox of settings. When checked, xili-language (with a filter) dynamically changes the link of ‘Home’ by adding current language. So the navigation remains in the choosen language.
    Hope you don’t forget to add stars !

    • Ella V says:

      Hi,
      I have the same problem that was described above. Unfortunately I still can’t find a solution. Your explanation refers to the older version, I have 1.9. When I switch language and browse the site, the click on “home” page it shows in English instead of the language I was browsing in. In the setting I have Home page in “English”. When I had “browser setting” instead it didn’t work as my browser is set to English as well. I’m bilingual, as well as a lot of the users for the future site. Is possible to have Home page be shows on the current language?

  7. Pingback: fatal error when calling xiliml_the_other_posts « Forums of xiligroup.dev

  8. Pingback: Link in navigation « Forums of xiligroup.dev

  9. Pingback: Arabic - not showing in xili-language 1.9.0 - and other (xili-dictionary) « Forums of xiligroup.dev

  10. dev xiligroup says:

    What theme do you use ?
    Is home as a page setted ?
    Verify that the default home page has his “sister” page in other language !

  11. Pingback: xili-language review, discussions, does it work, and ratings on Loadwp.com | Loadwp.com

  12. marcos says:

    How do i upload the .mo .po files to my NEWS studiopress Theme?Been trying for hours and can’t find a solution.

    • dev xiligroup says:

      Is your theme localizable ?
      Do you have an ftp access ?
      Please to continue, use the email form and check options inside xili-language settings to give more infos… I will answer quickly !

      M

  13. Pingback: xili-language | WordPress Designer

  14. Pingback: xili-language | Wbcom Designs | WordPress Developer

  15. andres says:

    hola tengo el problema de que el idioma por defecto me queda en ingles y mi sitio es en español, no puedo lograr que quede el español como idioma base, algunas cosas estan bien traducidas del theme pero otras no, ya intente todo y lei los tutoriales pero no puedo resolverlo.

    hello I have the problem that the default language is English and I my site is in Spanish, I can not get it is the Spanish language as basis, some things are well translated from the theme but not others, and try everything and I read the tutorials but I can not solve.

  16. dev xiligroup says:

    This post is around two years old (for previous version). For more recent informations, don’t forget to read the xili-wiki docs at – http://wiki.xiligroup.org

    After studying all this docs, if the problem persists, try to use support form provided in xili-language settings.

  17. Hello,

    I solved most problems (For those who have problem with menu like I had, make sure you download the latest twentyten-xili and check appearance/xili options.).

    Now remaining one is to get the posts list according to the language.

    It is working if home page is set to latest posts and . But not if home is a page and posts are in another pages (blog).

    I use twentyten xili theme. Is there a simple way ?

    Thanks a lot.

    Best regards,

    CDC

  18. dev xiligroup says:

    if on your home page, the visitor browser detect (and show) spanish page… on sidebar, i f a list a categories is displayed, when clicking on a category, only the sub-selected posts will be shown (because xl adds ?lang=es_es at end of each link in this list)…
    in widget language_list… it is the same… when displaying a category, the links under language are adapted !
    Have you visit (and read) http://wiki.xiligroup.org ?

  19. Comrade Dong Chi says:

    Thank you for your quick answer,

    I did read most documentation but I cannot see my posts according to visitor browser language or according to current language chosen with flags if my posts are not in Home page.

    I want my home page static with blog posts in another menu item, displayed according to current language. Is it possible ?

    Best regards.

  20. dev xiligroup says:

    As explained before, (and visible on this site http://2011.wpmu.xilione.com – how-to news)… if in your menu (or widget), you select a category (grouping the wanted posts)… according language, the results (after clicking) will sub select the wanted posts according language…

    Next time open a topic on forum http://dev.xiligroup.com/?forum=xili-language-plugin

  21. jordan says:

    Is the theme pinboard compatible with your plugin?

  22. iben says:

    I’m using the Pinboard theme d can’t make it not to show all languages on home page.

    Home page is set to recent posts.

    There is a query filter in the functions.php, but it appears that xili functions (like the_curlang() and the lang query parameter) is not ready (return NULL) when the filter is applied.

    function pinboard_filter_query( $query ) {
    global $wp_the_query;
    if( $wp_the_query === $query ) {
    $query->set( 'lang', the_curlang() ); // is_home() && pinboard_get_option( 'slider' ) )
    $query->set( 'ignore_sticky_posts', 1 );
    if( $query->is_home() && pinboard_get_option( 'blog_exclude_portfolio' ) )
    $query->set( 'cat', '-' . pinboard_get_option( 'portfolio_cat' ) );
    }
    }

    I tried another method, that in the index.php I set a query_posts with the parameters, but that breaks pagination (the second page also contains all pages from first).


    $args = array(
    'post__not_in' => get_option('sticky_posts'),
    'lang' => the_curlang(),
    'paged' => 1,
    'posts_per_page' => 4
    ); ?>
    query_posts( $args );

    What can be the problem?

  23. kEVIN says:

    iM HAVING TROUBLE WITH THE FLAGS IN 2012 RESPONSIVE THEY WONT COME OUT ON MY MENU BAR JUST IN LETTERS HOW CAN I FIX THIS?

    AND IS THE A VIDEO THAT SHOWS HOW TO GO ABOUT DOING A XILI MULTILINGUAL WEBSITE

    • dev xiligroup says:

      To solve your issue by support, the best way is to consult the support via the support form included in the admin side on the fifth tab of xili-language settings… Have you read also wiki.xiligroup.com
      M.

  24. Athan says:

    Hi
    i m using admired theme. I really cant find a way to make it work with primary menus using english and greek.
    Any ideas? Any tutorial on this?

    • dev xiligroup says:

      Have you read http://wiki.xiligroup.com ? I remember that some greek/another language website use easy xili-language plugin and example theme like 2013-xili (see link in readme or plugin page in wp repository…

      Enjoy,

      M.

  25. Nande says:

    I translated for WordPress clients plenty of themes and websites using https://poeditor.com, an online localization platform. I always recommend real translation for the most professional results.

Comments are closed.