• ResolvedPlugin Author Mark O’Donnell

    (@markodonnell)


    This is an e-mail I received from shoalsummitsoltions.com today and moved it here.

    Hello,

    im using your Game Schedules Plugin and tried to do a localisation in German. I used PoEdit and translated the default.po/mo files that a found in the LANG dir.

    I edited the PHP File in this:

    //      MSTW localization domain
            $mstw_domain = 'mstw-loc-domain-de_DE.mo';
    
    // ----------------------------------------------------------------
    // Set up localization
    add_action( 'init', 'mstw_load_localization' );
    
    function mstw_load_localization( ) {
            global $mstw_domain;
        load_plugin_textdomain( $mstw_domain, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
    } // end custom_theme_setup

    But i dont have success?

    Could you tell me what am i missing or maybe doin wrong?

    regards,
    Christian

    http://wordpress.org/extend/plugins/game-schedules/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mark O’Donnell

    (@markodonnell)

    Hi Christian,
    First note that I only enabled internationalization on the user side, not the admin site (edit screens, etc.).

    You almost have it, but you’re working a bit too hard. You should NOT make any edits to the .php files to create a new translation. Put them back the way they were. Then:

    • Open the lang/default.po file, enter the German translations, then save it as lang/mstw-loc-domain-de_DE.po. (Two files will be saved the .po and a .mo. The .po file is editable, the .mo is not.)
    • Next edit your wp-config file, which should be in the root directory of your WordPress site. Find the line:
      define ('WPLANG', '');

      and change it to

      define ('WPLANG', 'de_DE');

    Let me know if this works for you. And if you will please send me the de_DE.po file, I will include it in the next release.

    Thanks.
    -Mark

    Hello Mark,

    thanks for the advice!

    I reinstalled the original files and now it works like it should.

    Regarding the German Lang File i could send it to you but i think it makes not that much sense because i use it in a very specific way, e.g. as for OPPONENT the correct translation would be „Gegner“ – but i call it „Turnier“ (Tourney), because i use it for Billards.

    One more thing:

    In the Countdown widget it would be fine to have a possibility to set a number of games that will show up instead of only 1 game a time. Is that doable and how?

    Regards,
    Christian

    One more thing:

    I change the time format from Month Day Year —> Day Month Year (is more convinient in Europe).

    No i get an Error that says :

    Warning: date() expects parameter 2 to be long, string given in /wp-content/plugins/game-schedules/mstw-game-schedule.php on line 1282

    I dunno wether or not this has something to do with the date format change?

    Any suggestions?

    I solved the Error message – seemed, that i had forgotten to enter the correct time for the event.

    Now the error is gone.

    Plugin Author Mark O’Donnell

    (@markodonnell)

    Great. Glad to hear that.

    Yes, you have to be very careful about the time format. The code is brittle – I need to add more robust error checking.

    In the FAQ for version 2.1 (released today) I added some information on setting the date-time group format in various places.

    So I am calling both of these topics resolved.

    -Mark

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Translating to a New Language’ is closed to new replies.