Support » Fixing WordPress » how to make a localization work?

  • Hi!
    I have done a localization file on pt_PT.po and produced a
    I would like to test this translation on my site to cheack for errors. On wiki it written:
    iThe MO is the end of the line. The MO provides full support for a given language. To install French language support, a user would place into the wp-includes/languages directory of his WordPress installation.\i
    But i can´t make it work. Created a wp-includes/languages/ and upload there, but i miss what makes it work. Do i have to do a clean install, or can i mess up config-php?

Viewing 10 replies - 1 through 10 (of 10 total)
  • also add the line:
    ´define(‘WPLANG’, ‘’);´
    to your wp-config.php file.

    I just updated the wiki accordingly.
    I think every .po page should feature an explanation on how to do it, or some kind of documentation. fr.po and es_ES.po already do.

    Changed to ´define(‘WPLANG’, ‘’);´ as sugested but
    I´ve got
    Parse error: parse error in /home/XalteredX/XalteredX/teste/wp-config.php on line 8
    l10n.php shouldn´t be change too?
    the file seam ok and is on /wp-includes/languages/

    Didn´t use the apostrophes, it was a dumb way to show code.
    Still i get:
    Parse error: parse error in /home/psico13/public_html/teste/wp-config.php on line 8
    Please confirm this :
    define(‘WPLANG’, ‘’)
    define(‘WPLANG’, ‘pt_PT’)
    on the spanish
    is writting :
    define (‘WPLANG’, ‘es_ES’);
    (no .mo extention)
    I´m getting a little confused!

    I didn’t notice the mistake : don’t put “.mo” in the define.
    define(‘WPLANG’, ‘pt_PT’) is the way to go.

    is line 8 in your wp-config.php the line of the define(… statement?
    and did you end the line with a ; (semicolon), seeing as you pasted the define in here without semicolon.
    wp-110n.php adds the “.mo” (as you can check in the source code) so you must not include it in the define statement.

    Great !
    Sorry it was a space produced by my nasty text pad. Working now, but i have this big bug on localization!
    The english calender output
    S M T W T F S
    So ther are two T (Tuesday Thursday) and two S (Saturday Sunday), and can be ignore
    But in portuguese (and i belive other languages)
    Dom Seg Ter Qua Qui Sex Sab
    Should be:
    D S T Q Q S S
    D S T Q T S D
    So don´t make 2 T not 2 S !

    Sorry forgot the URI for tests

    Moderator Ryan Boren


    WordPress Dev

    psicotico, the calendar issue is a bug. You can use the three letter abbreviations instead by calling get_calendar() with a numeric argument.
    BTW, anyone know of a good multi-byte string library written in pure PHP and licensed under the GPL? That’s what we really need to fix this.

    rboren : I’m sure you’re already aware of this, but I’m still gonna say it : the main problem is not with the number of letters used in the abbreviations, but the fact that two days are duplicates of two other days, which makes the calendar unusable to other language.
    Other language also use the same letter for some days, but not the same day as english. Here’s how it should display (as best as I could understand – let me know if I made a mistake):
    uk : S M T T F W S (1st day of week is sunday)
    fr : L M M J V S D (1st day of week is monday/lundi)
    pt : D S T Q Q S S (1st = sunday/domingo)
    it : L M M G V S D (1st = monday/lunedì)
    de : M D M D F S S (1st = monday/montag)
    …which is still understandable (for these languages, I understand others DO need more than one letter).
    The first problem to solve (and I guess it already is, or is in the works – again, I’m not trying to tell you what should be done rboren, as I’m sure you’re already aware of these issues)… erm, the first blablabla solve is the “first day of the week” issue. Combine this problem with what other languages see in WP and you get this kind of calendar (again, let me know if I made a mistake) :
    uk : S M T W T F S
    fr : D L M M M V D
    pt : D S T Q T S D
    it : D L M M M V D
    de : S M D M D F S
    Hard to tell what’s what. If you’d ask me : too many M & S 🙂
    I’m writing this as some kind of reference, hopefully that will be helpful to someone… I’m going to add a Known Bugs section in fr.po, so that no one gets a surprise…

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘how to make a localization work?’ is closed to new replies.