New Landing How can we help? Cardinal Update translation strings

Viewing 8 posts - 1 through 8 (of 8 total)
  • Posted in: Cardinal
  • #237801
    Kirsten
    Member
    Post count: 192

    Hey guys,

    I updated the theme to version 2.40 and also updated my translation file to that version, but a lot strings are now not being translated when the were before. Can you please update your .po files? See screenshot for some of the non translated strings.

    Attachments:
    You must be logged in to view attached files.
    #238123
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Can you send me .po file you are using?

    Did you previously manually add any strings?

    Thanks.

    #238336
    Kirsten
    Member
    Post count: 192

    Hi David,

    Here you are. I haven’t manually added strings.

    Information:
    I have updated my .po file with POedit every time a new update from Cardinal was rolled out. For these updates I used the US.po file.
    I run my .po files from the child theme folder on the server.

    Thank you.
    Kirsten

    #238346
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please copy the language directory with .po and .mo files and paste at child theme directory. Now paste this code at functions.php of child theme.

    add_action( 'after_setup_theme', 'sf_child_theme_setup' );
    function sf_child_theme_setup() {
        load_child_theme_textdomain( 'swiftframework', get_stylesheet_directory() . '/language' );
    }
    

    Thanks
    Mohammad

    #238347
    Kirsten
    Member
    Post count: 192

    Great Mohammed, adding the function did the trick. po files were allready in my child theme. What was wrong with the old function, originaly in the child theme:

    load_theme_textdomain(‘swiftframework’, get_stylesheet_directory_uri().’/language’);

    #238350
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You are using the this function get_stylesheet_directory_uri() that return web url. While i used this function get_stylesheet_directory() that returns an absolute server path (eg: /home/user/public_html/wp-content/themes/my_theme), not a URI.

    Thanks
    Mohammad

    #238359
    Kirsten
    Member
    Post count: 192

    Ok thanx for the explanation. It was the original line of code I uncommented like stated in the functions file of the child theme. But I see that line has changed through the year. Thank you for your time.

    #238364
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome and glad to help you.
    Thanks
    Mohammad

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 the following item
Login and Registration Log in · Register