How To Translate DukaPress Into Your Own Language

28

This is a rough guide on how to translate DukaPress using poEdit. It is adapted from Translating WordPress Plugins by Lester Chan. We are going to go through the steps of translating DukaPress into the Swahili language used in the Republic of Kenya.

Step 1

Step 2

  • Install poEdit

Step 3

  • Launch poEdit

Step 4

Step 5

  • In poEdit, Go To ‘File -> New catalog from POT file’

Step 6

  • Browse for the file ‘dukapress.pot’ which you just downloaded and Click ‘Open’.

Step 7

  • Fill in the following details to the settings:

Project name and version: DukaPress 2.0
Team: Fill in your own name
Team’s email address: Fill in your own email address
Language: Swahili
Country: KENYA
Charset: utf-8
Source code charset: Leave it blank
Pural Forms: nplurals=2; plural=n != 1;

  • Click ‘Ok’
  • Save it as dukapress-sw_KE.po
  • Click ‘Save’

Step 8

  • Type in the translated string in the small box located at the bottom left hand corner of the screen.
  • Translate the remaining strings.

Step 9

  • When you are done, click on the ‘Save Catalog’ button located on the top, it is the second button from the left.

Step 10

  • Upload dukapress-sw_KE.po and dukapress-sw_KE.mo to your site into YOUR_WORDPRESS_FOLDER/wp-contents/plugin/dukapress/languages
  • Just a note, the dukapress-sw_KE.mo is automatically generated by poEdit, you need the file in order for the translation to work.

Step 11

  • Make sure that WordPress is already in your own language or the plugin translation will not work.

Notes

  1. You should be able to follow these general steps to translate DukaPress into your own language.
  2. The filename dukapress-sw_KE.po comes about by incorporating the locale of Kenyan Swahili i.e. sw is the language code for Swahili and KE is the country code for Kenya. If, for example, you wanted to translate into French spoken in France, you would need to get the language code for French (fr) and the country code for France (FR) to get your filename: dukapress-fr_FR.po.

Further Reading

28 Responses

  1. Fabio Fucci says:

    Some words are not localized in your code in the 2.0 version.
    I have changed them on my copy:

    dp-cart.php (line 285)

    changed in:

    dp-cart.php (line 292)

    ‘;

    changed in:

    ‘;

    Obviously you have to update also your po file. Hope this will help for future releases.
    Great job guys!

  2. Cophie says:

    Hi,
    I’ve translated the whole shop (with poedit and missing words in phps) but I can’t find two sentences at cart (order details):

    – Please write only text here (where I have to write name)
    – Please write only numeric here (where I have to write phone number)

    Can you help me to find these senteces? I really like to translate them too.
    Thanks

  3. Marco says:

    Hi, i will trie to translate the plugin into german, but the dukapress.pot file is not available on this site. Can you send me the file? Thanks! You make a good job!

  4. wolforg says:

    Hello and congratulations for this great plugin 🙂

    I’ve translated it in french today, feel free to download this translation here : http://www.wptrads.fr/dukapress/

    Keep the pressure,
    Wolforg

    • hey thanks man, this is perfect. I was searching today if someone translated this in french, and it’s done!

      btw, i found something, “i have a different shipping address” is not in the line 1034 in dp-cart for, it’s in line 1036, i changed this but i don’t know why it’s not working…
      The button make payment is not translated too, but it’s the good line… But everything else is perfect!

      If there is a spanish translation, i would be interest to have this.

    • Kelvin says:

      Thank you for this! I appreciate your efforts VERY much.

    • Kelvin says:

      I would like to include your work in the official release package. Is this okay?

  5. wolforg says:

    @Kelvin,
    Yes no problem for me. I’ve posted this comment for that 🙂

  6. I have some problems with translation.
    I have an English WordPress installation, but I would like my customers to see the shop in Swedish
    I downloaded the pot file and followed the instructions to generate po and mo files for Swedish.
    Then I uploaded them to the server like it said, but I can’t get them to activate.
    I tried naming them correctly (“dukapress-sv_SE.mo”) but that didn’t do anything.
    I tried simply replacing the default mo and po files with my own, but even that didn’t do anything.

    Suggestions, please?

  7. Alexey says:

    i’m translating the plugin into Russian, cannot find the place for the buttons which appear on the checkout page – “update” and “remove”.

    also the fixed limit shipment option seems to put 0 for delivery every time, even if it’s less than the limit.

  8. Von Schmytt says:

    Hi,

    Awesome plugin! I’m just wanting to make a few small changes to the default language.

    e.g. Tax to VAT, Cart to Basket.

    I’ve made these amends in the dukapress.po and dukapress.pot but i’m not seeing this in the front of the site.

    Could you let me know where i’m going wrong?

  9. Man9 says:

    I started translating the plugin into Finnish and followed the instructions.

    I tested the saved files on server but Dukapress seems not to use the translations. Any idea why? I have dukapress-fi_FI.mo and dukapress-fi_FI.po files in the Dukapress Languages directory. Also my WordPress language is set to Finnish in wp-config.php, but Dukapress still uses the original strings.

    If appreciate any ideas what to try next.

  10. Sini says:

    I have same problem with Finnish translation. Any solutions jet?

  11. Bacterio says:

    Thanks for this plugin, it’s being very helpfull for months.
    I forgot to report I made the Catalan version, you can find it here.
    If you wish, you can, of course inlude it on following updates.
    I hope it be usefull for somebody!

    http://www.veintegenarios.net/wordpress/dukapress_ca_ES.zip

    Compartir dóna gustet! (sharing is delicious!)

  12. gisela says:

    I uploaded the file but pt does not work, I have to do more? I have wordpress in Portuguese, why not work, I have to do anything else?

Leave a Reply

© 2016 DukaPress. All rights reserved.
Design By Madoido.