Follow us on
  1. Hi,

    Thanks for developing such an amazing plugin.
    Please let me know whether the CS theme options is compatible with WPML multilingual plugin.

    Current Issue:
    Currently, we need to create separate options for each language. Eg: for a logo, we need to create options like logo_en, logo_ar, logo_de etc..

    Our expectation:
    The theme options built with CS should be cloned when used with multiple languages. Eg: for a logo, we need to create only the option "logo" and upon switching the language, it will load different values (back-end and front-end).

    Posted 1 year ago #

  2. Codestar
    Admin

    Hi,

    You can use wpml-config.xml idea of WPML. take a look "Admin texts / wp_options" tab.

    Shortly it mean:

    Create wpml-config.xml to theme or plugin root and set the admin text.

    <wpml-config>
      <admin-texts>
        <key name="UNIQUE_ID_OF_FRAMEWORK">
          <key name="logo"/>
          <key name="footer_text"/>
        </key>
      </admin-texts>
    </wpml-config>CopyCopied!

    hmm, If you search a solution in admin panel logo field change by switching the language, it's complex a little. For eg: http://support.codestarthemes.com/topic/using-with-multilang-website

    How I can help you more ? Feel to free ask any question

    Regards, Codestar

    Posted 1 year ago #
  3. Hi Guys,

    Thanks for your response.

    I have created a video which explains my issue. Please watch this video and let me know your thoughts.
    The video is just 2.5 minutes: https://youtu.be/eok3naaNZ7Q

    Posted 1 year ago #

  4. Codestar
    Admin

    Hi,

    Yes, I got it. Just you need to add "after_setup_theme" action as well. Like this:

    add_action( 'init', 'cs_to_multiligual' );
    add_action( 'after_setup_theme', 'cs_to_multiligual' ); // <<--- also this.
    
    function cs_to_multiligual() {
      do_action( 'wpml_multilingual_options', 'my_framework' );
    }CopyCopied!

    It works?

    Regards, Codestar

    Posted 1 year ago #
  5. Hi,

    Thanks for the support, but still no luck
    I tried it with the default theme and it is not working.

    Regards
    Ancil

    Posted 1 year ago #

  6. Codestar
    Admin

    Hi,

    Uh, I missed one thing. The framework priority 10 for after_setup_theme. let's do it 9 and try it again. like this:

    add_action( 'init', 'cs_to_multiligual', 9 );
    add_action( 'after_setup_theme', 'cs_to_multiligual', 9 );
    
    function cs_to_multiligual() {
      do_action( 'wpml_multilingual_options', 'my_framework' );
    }CopyCopied!

    This time, I have tested it looks work.

    Regards, Codestar

    Posted 1 year ago #

  7. You guys are AWESOME
    Working perfectly!

    Lots of love Love Codestar

    Posted 1 year ago #

  8. Codestar
    Admin

    You're welcome, we love you too

    Posted 1 year ago #