Before you ask please READ THIS

Theme Translation

edited October 2012 in Spaceship Posts: 1
Hey,

I've started translating the Spaceship theme to Hebrew.
So far, I got no problems with the CSS and PO (too bad it is not supported by the "CodeStyling Localization" plugin - please check&fix that).

Now I would like to translate the admin menu as well.
Did you create the system in an easy-to-translate way or do i have to go through the different PHP file to replace the words & texts ?
And also, is it possible to make the changes in the child theme and not in the base theme ?

thanks
Itay

Comments

  • AirAir
    Posts: 10,970
    Hello I was expecting you ;-)
    itaybd said: too bad it is not supported by the "CodeStyling Localization" plugin - please check&fix that
    I will check what is this plugin for, and ask more questions to you if needed.

    For backend translation I will create PO file today and will attach it here, so you won't have to go through all files.
    Most other changes are possible through child theme as described in documentation.

    With regards.
  • AirAir
    edited October 2012 Posts: 10,970
    OK, it require some more changes, so lets go:
    1. Extract zip file to spaceship/languages so you will have structure like spaceship/languages/admin/default.po
    2. Edit spaceship/advance/apollo13.php (don't worry it will land in some silent update of spaceship so you won't loose it). Find ~114 line

    function set_lang() {
    load_theme_textdomain( TPL_SLUG , TPL_DIR . '/languages' );

    $locale = get_locale();
    $locale_file = TPL_DIR ."/languages/$locale.php";
    if ( is_readable($locale_file) )
    require_once ($locale_file);
    }
    and change it to

    function set_lang() {
    load_theme_textdomain( TPL_SLUG , TPL_DIR . '/languages' );

    $locale = get_locale();
    $locale_file = TPL_DIR ."/languages/$locale.php";
    if ( is_readable($locale_file) )
    require_once ($locale_file);

    // For admin translation
    if ( is_admin() ) {
    load_theme_textdomain( TPL_SLUG , TPL_DIR . '/languages/admin' );
    }
    }
    Next follow http://apollo13.eu/docs/spaceship/#!/translating_theme but place your translated files in spaceship/languages/admin

    Should be all:-)

    With regards.
    zip
    zip
    admin.zip
    7K
    Post edited by Air on
  • AirAir
    Posts: 10,970
    OK , now I know a little about that plugin you have mentioned. So what exactly issues you face while using it with our theme?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion