Translations

Basic support is open to all members of Volatyl Themes but what about those who need a little more? That's what Volatyl Themes subscriptions are for. The Priority Support subscription gets you more detailed, personal support while the Advanced Development subscription not only includes Priority Support, but also grants you access to premium content only seen by subscribers. This premium content will help you take your Volatyl websites to the next level with advanced development techniques, integration tips, and more information on how to really put Volatyl to use. Check out the subscriptions!

This topic is: not a support question

This topic contains 1 reply, has 2 voices, and was last updated by  sdavis2702 6 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4028

    Roberto Porcar
    Participant

    Hello, I post some snippets to complete the translation of volatyl and the child themes.

    Install Poedit, and work with the files located at /volatyl/inc/languages.

    For example, to get the spanish version you will need the files renamed as: es_ES.po and es_ES.mo

    There are some strings to translate in the child theme. You can write some code at your functions.php file.

    For example, to get simple strings translated you will have some like:

    function flamerz_translate( $translated_text, $text, $domain ) {

    switch ( $translated_text ) {
    case ‘Previous Article:’ : $translated_text = __( ‘Artículo Anterior:’, ‘volatyl’ ); break;
    case ‘Next Article:’ : $translated_text = __( ‘Artículo Siguiente:’, ‘volatyl’ ); break;
    case ‘Leave a Reply ‘ : $translated_text = __( ‘Deja un comentario’, ‘volatyl’ ); break;
    case ‘Submit Comment’ : $translated_text = __( ‘Deja un comentario’, ‘volatyl’ ); break;
    }
    return $translated_text;
    }
    add_filter( ‘gettext’, ‘flamerz_translate’, 20, 3 );

    Maybe you have to translate some arrays, like the search link. This worked fine for me:

    function more_tag_link( $search_text ) {
    $search_text = array(
    ‘search_field_text’ => ‘Buscar en esta web’,
    ‘search_submit_text’ => ‘Buscar’
    );
    return $search_text;
    }
    add_filter( ‘search_text’, ‘more_tag_link’ );

    I hope it helps.

    I’m not fluent with php, maybe there are more elegant ways to do this.

    #4029

    sdavis2702
    Keymaster
    Post count: 72

    Thanks for sharing your methods! I replied to your email a few minutes ago.

    I’m going to do some more translation work myself to see how I would handle it if I had to translate my own site now. I’ll let you know if I would have taken a different approach!

    Thanks again.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.