[Support request] Issues translating the footer

Home Forums Support Issues translating the footer

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1096409
    sirlouen

    I wrote this post some weeks ago:
    https://generatepress.com/forums/topic/translating-footer-with-wpml/

    The thing is that I thought that I solved the issue, but now I found I didn’t.
    The real problem I did not notice at the time, is that WPML doesn’t pick the generatepress footer string ([theme_mods_generatepress]generate_copyright), when using the generatepress child theme.

    So when I switch to the base theme, it works fine, but when I turn back to the child, the footer is never registered in the WPML string list, so I cannot translate it.

    #1096595
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Have you contacted WPML about this at all? Their support is awesome and they should have a better idea of why it would work in the parent and not the child. The copyright itself should be translatable by default (the WPML team have ensured compatibility with GP).

    Let me know 🙂

    #1097074
    sirlouen

    Hello Tom

    What I liked about Generatepress compared to other themes is that I found from the beginning that the support team, always seemed to try to take the duty of the issue, before shuttling to the other plugin team. WPML obviously said that this issue was on GP behalf.

    After 1 hour of research, I’ve solved the issue by myself and this was clearly a problem on GP-Premium plugin, as I suspected 🙁
    I’m going to share it here because I’ve read that some users seem to have had the same issue in the past:
    https://www.google.com/search?q=generatepress+footer+wpml

    Through some queries in the database I found that GeneratePress creates a key in wp_options when using a Child Generatepress theme namely: “theme_mods_generatepress_child” (not 100% sure how it is generated, but probably as “theme_mods_<name_of_the_gp_child>“.

    Therefore, this shall be implemented in wpml_config.xml as expected by the WPML docs in order to work, similarly to the parent theme equivalent:

    After that, the string will appear in the String translation list:

    The big issue I find is that this could be broken again in the next gp-premium update because I have edited the main plugin files…

    What can be done?

    #1097478
    Tom
    Lead Developer
    Lead Developer

    We always do our best, but sometimes our knowledge is limited when it comes to some plugins (we’re not perfect).

    Ideally, the copyright shouldn’t be a theme mod, but that’s another topic.

    Is it possible to add your own wpml-config.xml file inside your child theme?

    We could add that item to our own wpml-config.xml file in GPP 1.10 – might be the best way forward?

    Thanks for sharing the solution! 🙂

    #1097935
    sirlouen

    I’m not sure if its possible to add an wpml-config.xml in my child theme…
    In fact I’m not sure how the wpml-config.xml thing works.

    We could add that item to our own wpml-config.xml file in GPP 1.10 – might be the best way forward?

    In fact, I’m not sure how new wp_options keys for theme_mods_ are generated. In this case my child theme is generatepress_child but I’m not sure if the user creates a child theme called generatepress_child_theme or generatepress-child instead of generatepress_child what may happen in the database…

    #1098138
    Tom
    Lead Developer
    Lead Developer

    Ideally, we need to replace theme_mods with regular options.

    I did find this, which says the parent config file is read over the child theme one (not sure why): https://wpml.org/documentation/support/language-configuration-files/#using-wpml-language-configuration-file-with-child-themes

    I know I asked before, but have you checked with their support? They might have a way to define options inside their UI so you don’t have to edit the wpml-config.xml file. That would definitely be the preferred method.

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