Categories

Twitter


Follow @pietvo

Calendar

March 2017
S M T W T F S
« Dec    
 1234
567891011
12131415161718
19202122232425
262728293031  

Upgrading WordPress and WPML

My blog site (i.e. this site) was in need of an update. I hadn’t updated WordPress for quite some time. The most important reason was that the site used Gengo to make it a multilingual site with corresponding posts in English and Dutch connected. Not that I have that many posts that are bi-lingual, but you have to be prepared for the future. Gengo is no longer maintained and moreover was quite buggy. I had been hacking in it without proper version management and in fact I had so many versions on my disk that it was confusing. Along came WPML which looked much better. I had devised some SQL statements to transfer the translation information from Gengo to WPML, at least for posts. I had tried this out on a local copy of the site and it seemed OK. The translation information for categories and tags was more difficult than for posts because the structure of these translations in WPML is quite different from that in Gengo. Gengo allows you to use the same name in both languages but WPML does not. (In fact WPML allows names like `Cat @en’ which is the English version but shows as `Cat’). So the investigation for this automatic translation stopped. I also was interested in other subjects, like eBooks, so I just left the site as it was. In the mean time WordPress version 3 was released and I wanted to switch over to this version.

This week I decided to take the plunge, of course first on the local shadow site. I decided not to try an automatic translation of category and tag names because their number is limited and I could do the translation on demand. I first installed the latest version of WPML, version 1.8. It superficially looked OK, until I tried to access the pages. They gave an error that they could not be found. I first thought it might be the theme, but switching to the default theme gave the same problem. So did switching off all other plugins. Searching for the same problem brought up a message in the WPML forum of someone who had the same problem but no solution. Finally I decided to install WordPress 3.0. I hate doing two major changes at the same time, but I had no choice. Fortunately this solved that particular problem. However, it introduced a new problem: my theme, an adapted version of Tiga (adapted to Gengo) did not work. So I started searching for WordPress 3 themes compatible with WPML that are similar to the theme I had, the most important that it should have 3 columns, fluid and not too wild. I found Atahualpa, quite a nice theme and extremely customizable.

Atahualpa in itself is not WPML compatible but the WPML developers have a version that is modified to support WPML. It also can translate all strings that you enter yourself in the Atahualpa administration interface for customizing it.

I also tried newer versions but these give problems with the translation. Very much understandable as they have not been adapted to WPML. First I tried to mimic my original modified Tiga theme, and it appears that Atahualpa is so flexible that it could emulate the theme almost 100%. I am sure that with some more tweaking I could have got more than 99.9%. But later I just decided to redo the layout of the site and started with the default setting of Atahualpa slightly modified. I find especially the contrast of the defaults too low, a problem that it shares with many modern designs that use a lot of gray and light colors, and small fonts. This does hurt my aging eyes. I think in the coming weeks I will still do some more tweaking but in general I am quite happy with the new setup.

[Another nice thing for me is that I live close to Avenida Atahuallpa (with ll – a bit more difficult to pronounce) and I often go through this avenue.]

Update (Jul 28, 2010)

I made changes to the WPML-enabled Atahualpa theme (version 3.4.1). I removed the fixed locations for the language selection because you can now select them with options and with a widget, and I don’t want to have them double. Moreover the new ones are more customizable. I think the next update should make these fixed things optional. The following lines of code were removed:

footer.php:77:  <?php wpml_languages_list() ?>
header.php:51:  <?php wpml_languages_selector() ?>
index.php:21:  <?php if(is_singular()) wpml_content_languages(); ?>

Also because I use a language list rather than a drop down menu for the language selector I had to do some CSS fiddling to get the size right. I consider this a WPML bug (reported). Fortunately Atahualpa allows you to add CSS without changing the source code.

Update (July 30, 2010): Upgraded to WordPress 3.0.1.

3 comments to Upgrading WordPress and WPML

  • Flavio

    Hi Piet

    Sounds interesting, but I don’t understand much. Could you give me a hand?

    I am trying to set up a site using Atahualpa 3.6.7 and at first I installed WPML 2.? (the last free version released). I decided to upgrade WPML 2.3.2 (the paid release) because it was providing better integration with themes… all what I wanted was to get the same you did, ie the flags in the menu bar… I thought I would get new customization options, but not… may I ask you… how did you manage?

    Truly yours (I’m in your hands) 🙂

    • I have done this in the Atahualpa theme options (wordpress admin screen). I have not upgraded to the paid version of WPML, and I have Atahualpa version 3.4.1, so I don’t know if my changes will work in your setup.
      Anyway, first in the in the Atahualpa screen “Style & Edit HEADER AREA” in the part “Configure Header Area” I have the following:
      %logo %bar1 %image %bar2 < ?php do_action('icl_language_selector'); ?> %pages.

      Then in the Atahualpa screen”Add HTML/CSS inserts”, in the part “CSS inserts” I have the following code:
      div.widget-title a {
      font-weight: bold
      }
      div.post-bodycopy blockquote p {
      margin: 0;
      }

      #lang_sel_list {
      width: auto;
      height: auto;
      float: right;
      }
      #lang_sel_list ul,
      #lang_sel_list li {
      width: auto;
      }
      #lang_sel_list a,
      #lang_sel_list a:visited {
      display: inline;
      font-weight: normal;
      }

      div#menu1 {
      margin-bottom: 10px;
      }

      I think only the lang_sel_list stuff is relevant. It has been a long time since I did this so my memory has become a bit hazy.

      Good luck!

  • Hallo Piet,

    Dank je wel voor de uitgebreide beschrijving hoe je dit voor elkaar heb gekregen.
    Ik ben nog steeds met hetzelfde onderwerp aan het rommelen, en ik kom er niet uit.
    ik had eerst wel het taalkeuze-menu aan de bovenkant, maar de layout was niet goed.
    Nu heb ik jouw aanwijzingen gevolgd en het gekke is dat hij de regel niet uitvoert, maar gewoon in de header zet.
    ik snap er niet van waarom dat gebeurt.
    Heb jij enig idee?

    Groetjes
    Thea Haak