• Resolved poeter

    (@poeter)


    Hello,

    I’ve issues with translating the labels in the options panel in my theme.

    1) The text domain is properly loaded with:

    load_theme_textdomain( 'chemid', get_template_directory() . '/languages' );

    2) admin panel sections and options are coded like this in the config file:

    config file:
    Redux::set_section(
    $opt_name,array(
    'title' => esc_html__( 'General Settings', 'chemid' ),
    'id' => 'general_setting',
    'icon' => 'el el-cogs',
    'fields' => array(
    array(
    'id' => 'chemid-primary-border',
    'type' => 'color',
    'title' => esc_html__('Borders Color','chemid'),
    'subtitle' => esc_html__('Pick a color for borders','chemid'),
    'transparent' => false,
    'default' => '#efefef',
    'output' => array(
    'border-color' => '.tmnf_border,.sidebar_item ul li',
    )
    ),
    )
    )

    );

    3) created and translated .po and .mo files are located in the proper theme ‘language’ folder and with proper names.

    4) The ‘Site Language’ is set in Setting > General

    The issue is that all theme labels across all theme parts are properly translated except the ones located in the redux config file.

    Standard theme labels (translated): https://prnt.sc/SK1OTDh73-eV
    Admin panel labels (non-translated): https://prnt.sc/xSDHSSRiI7Xl

    Thank you

    Daniel

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kev Provance

    (@kprovance)

    The issue could be many things, although they’d have nothing to do with Redux. Redux contains no code that does translations. You’ve provided that in in your option config with esc_html__(). We don’t offer support for WordPress and how it does or does not do things, plus I don’t have access to your theme (and that’s a premium service anyways, which we cannot advertise here).

    The most common issue would be the thread of execution. For example, if you are loading your config before translation are loaded, they would not show. That would be one reason why some translations appear and why some do not. I have no idea how your theme is setup or how you are specifically using Redux.

    Ensure your translations are loaded before including the options config.

    Good luck

    Thread Starter poeter

    (@poeter)

    Thank you!

    Here’s an update for anyone facing a similar issue: The Redux Framework config file needed to be included within the theme_setup function (and placed after the load_theme_textdomain function).

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.