Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #963435

    Hi,

    Where in my child theme should I put config-wpml/config.php, when I want to customize it? (The intuitive answer “enfold-child/config-wpml/config.php” doesn’t have any effect).

    #964628

    Hey HAJ-MBJ,

    Thank you for using Enfold.

    It’s not a template file so you can’t override it by copying the file in the child theme. What specific modification are you trying to make?

    Best regards,
    Ismael

    #964671

    Hi Ismael,
    Thanks for the quick reply!
    I need language codes (like EN, DE, ES etc.) instead of flags in the Enfold Language Switcher. It is easily done with modifications directly in config-wpml/config.php, but I guess it is not the right approach then?
    Best regards,
    Henrik

    • This reply was modified 6 years, 5 months ago by HAJ-MBJ.
    #964786

    Hello,

    i’ve got exactly the same objective and problem to solve. the modification way of the wpml site:

    https://wpml.org/documentation/getting-started-guide/language-setup/designing-custom-language-switchers-using-template-files/#menu-language-switcher

    doesn’t work, guess because enfold is overriding the template with its own wpml-config.xml??

    If there is any hint, how to do, i would appreciate it very much, too.

    Best Regards,
    paul

    #965264

    Hi,

    Thanks for the update.


    @HAJ-MBJ
    : You don’t need PHP modifications to accomplish that. Please try this css code instead.

    .avia_wpml_language_switch li .language_flag img {
        display: none;
    }
    
    .avia_wpml_language_switch li .language_code {
        display: block;
        text-transform: uppercase;
    }

    The language info are already included in the language container but they’re hidden by default.

    Best regards,
    Ismael

    #965273

    Hi Ismael,

    you did it, :)

    for my part it is working out fine.

    thanks a lot!

    regards from munich,
    paul

    #965725

    Hi Paul,

    Great, glad we could help. Please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

    #966367

    Hi,

    The solution doesn’t work for me. I can’t recognize the class “avia_wpml_language_switch” – and the vertical menu like switcher, that I use, does not include language codes in the HTML.

    It looks like this:

    
    <li class='av-language-switch-item language_en >
    	<a href='/en/'>
    		<span class='language_flag'><img src='flag_EN.svg' /></span>
    	</a>
    </li>

    Best regards,
    Henrik

    • This reply was modified 6 years, 5 months ago by HAJ-MBJ.
    #967441

    Hi Henrik,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #967464
    This reply has been marked as private.
    #969881

    Hi,

    Thanks for the update.

    Looks like you managed to display the language code instead of the flags. :)

    Best regards,
    Ismael

    #970014

    Hi Ismael,

    Yes – but in reference to my initial question: How can I accomplish this in a way, that won’t get overwritten in a theme update? (The present solution is based on editing directly in config-wpml/config.php, and I don’t know how to move the modification to child-theme).

    Best regards,
    Henrik

    #971477

    Hi,

    How did you modify the W P M L config file? Did you try the css code without that particular modification?

    Best regards,
    Ismael

    #971562

    Hi,

    I basically just replaced the img-tags (flags) with $lang['language_code'].

    Yes – I did try the CSS code on the original HTML, without any modifications. But the original HTML does not include the CSS classes you are referring to in the provided CSS modification.

    Best regards,
    Henrik

    #972008

    Hi,

    Thanks for the update.

    I see. Please copy the “avia_append_lang_flags” function without the function_exists check in your child theme’s functions.php file. That should override the default function.

    Best regards,
    Ismael

    #977962

    It works! Thank you very much!

    Best regards,
    Henrik

    #978082

    Hi Henrik,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

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