• I’m creating a plugin in WordPress and I want to know how could I translate with WPML a text that I call from The table database of the plugin

    this is an example of code that I want WPML to translate with multi-languages

     echo esc_html_e('Contact with','my-plugin') ." ". esc_attr($name);
    
     *$name it's coming from my plugin table in WordPress Database*

    I want to Know How to Translate “Contact with” and $name value with WPML multi-languages

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Andrés Cifuentes

    (@andrescifuentesr)

    Hello @sobexlast,

    I’m afraid it is not a WooCommerce Multilingual related question but WPML String Translation extension.

    However, following the recommendations from the Stakoverflow’s link should help for hardcoded strings as “Conctact with”. However, if you are using a table different than wp_options to store the value for $name, you will need to register the string using a hook as wpml_register_string:
    https://wpml.org/wpml-hook/wpml_register_string/

    I hope this point you into the right direction. Otherwise, don’t hesitate to create a new ticket in the WPML support forum? https://wpml.org/forums/forum/english-support/

    Regards

Viewing 1 replies (of 1 total)
  • The topic ‘How do i able WPML to translate my content widget?’ is closed to new replies.