New Landing How can we help? Themeforest Theme Support Neighborhood Swift Framework Translations Location for child theme?

Viewing 8 posts - 1 through 8 (of 8 total)
  • #111595
    tt1011
    Member
    Post count: 67

    I need to override and create new po/mo files for the text translations in the swift-framework/meta-box/lang directory.

    Where/how do we override these?
    I imagine the new mo po files go into the child themes languages directory or the wp-content/languages directory, but neither are working for me and each time I update the theme files I lose my edits.

    #111778
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Can you try the code adding the code below to your child theme functions.php

    Also you will need to create a “languages” folder inside your child theme and paste the .po and .mo files there.

    
    
    /**
     * Setup My Child Theme's textdomain.
     *
     * Declare textdomain for this child theme.
     * Translations can be filed in the /languages/ directory.
     */
    function my_child_theme_setup() {
    	load_child_theme_textdomain( 'swiftframework', get_stylesheet_directory() . '/languages' );
    }
    add_action( 'after_setup_theme', 'my_child_theme_setup' );
    

    -Rui

    #134760
    wildfox
    Member
    Post count: 58

    Hi,

    I’ve added the code in my child theme functions.php then I’ve created the languages folder and puted my new fr_FR.mo files inside but it doesn’t work.

    I need to get Meta Options tags and content translated, it’s found in swift-framework/meta-boxes.php file but it seems that it is not possible to get it translated.

    exemple of a tab title found in meta-boxes.php

    $meta_boxes[] = array(
    		'id' => 'thumbnail_meta_box',
    		'title' => __('Thumbnail Options', $text_domain),
    		'pages' => array( 'post', 'portfolio' ),
    		'context' => 'normal',
    		'fields' => array(

    Are you planning to make Meta Options translatable as well as Theme options in the back-end?

    regards

    #134764
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Can’t find that code in meta-boxes.php
    Are you using the Neighborhood theme or other theme?

    -Rui

    #134766
    wildfox
    Member
    Post count: 58

    I’m sorry, I was searching solution for Dante and found this thread. So my mistake…
    Should I post again in Dante section?

    #135098
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    @Wildfox

    No problem.
    For Dante try the code below.

    And move your fr_FR.mo that now it’s inside dante/swift-framework/language/ to dante-child/swift-framework/language

    
    /**
     * Setup My Child Admin Theme's textdomain.
     *
     * Translations can be filed in the /swift-framework/language/ directory.
     */
    function my_child_theme_setup() {
        load_child_theme_textdomain( 'swift-framework-admin', get_stylesheet_directory() . '/swift-framework/language' );
    }
    add_action( 'after_setup_theme', 'my_child_theme_setup' );
    

    -Rui

    #135111
    wildfox
    Member
    Post count: 58

    Thank you so much Rui, it works like a charm.

    #135120
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    That’s great.
    -Rui

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register