New Landing How can we help? Atelier How to enable WPML for slideout contact form

Viewing 15 posts - 1 through 15 (of 25 total)
  • Posted in: Atelier
  • #302465
    anettemossbacher
    Member
    Post count: 68

    Hi Swiftideas,

    How/where do I translate the slideout contact form? The contact page used has been translated and works fine in all languages when approached directly. Via the slideout I keep getting the non-translated English version.

    I don’t see a string that I can translate in WMPL Translation Management, so how to do this?

    Thanks,
    Anette

    #302554
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779
    #302606
    anettemossbacher
    Member
    Post count: 68

    Hi Rui,

    That doesn’t really work, so I will not be the last to ask. The “slideout contact field” points to a page based on an record number in a database table somewhere. There is no way to find the comparable record numbers for the translated versions via the Atelier interface nor the WMPL interface. The only way to get them is by doing a query in the actual database table to get the corresponding record numbers for the translations. I did that and managed to get it working.

    It is however definitely something Ed should have a look at … seriously 🙂

    Cheers,
    Johan Peijnenburg
    (on behalf of Anette)

    #302822
    David Martin – Support
    Moderator
    Post count: 20834

    Hi Johan,

    The Contact Slide Out is set in the theme options for the current language.

    WPML should treat your theme options as separate instances for each translation.

    Have you configured your theme options for each translation language?

    #302836
    anettemossbacher
    Member
    Post count: 68

    Hi David,

    Thanks for getting back to me 🙂

    What I did is created 5 forms in contact form 7 … one for each language. Then I created a page that incorporates the UK version and subsequently created translations for them (via the normal WPML translation options for pages) in which I point to the contact forms for the corresponding languages.

    That works fine when approaching the pages directly (via the page url). When switching language all works fine.

    That doesn’t work when subsequently including the UK version in the slideout menu option in Theme Options. I can’t specify a language there so I figured the theme would make sure it switches to the right language based on the page translations. It doesn’t.

    So what should I do differently?

    No I have not translated my theme options for each language I use on the front-end. Should I? I did enable translation for theme strings at some point to be able translate some of the strings that I couldn’t translate without enabling that option. Is that what you mean?

    Thanks

    #302839
    David Martin – Support
    Moderator
    Post count: 20834

    Yes, please translate the theme options for instances like the contact form.

    Ref: https://wpml.org/documentation/getting-started-guide/translating-theme-options/

    #302842
    anettemossbacher
    Member
    Post count: 68

    Haha, never skip the getting started guide ejh! 😉

    So, I actually do not need to set “Translate the theme and plugins using WPML’s String Translation” to on in Theme and Plugin Localization right? That is just for when people want to work with a interface in a different language right?

    #302930
    anettemossbacher
    Member
    Post count: 68

    Hi David,

    I am afraid that there actually is something wrong and you can simulate it:

    • Go to header-options in the Atelier theme options
    • Select a Contact Slideout Page language A and save … test and it will work in the site … all fine
    • Switch language to language B … select the contact page for language B and save …
    • Now switch bak to language A and see what the Contact Slideout Page option says: nothing!

    What happens is that the theme options saves the slideout page specified last (in this case language B) only and uses it in all languages. There is no way using the theme options to fix this. There also is no field available in {sf-atelier-options] that stores the data involved, so I cannot fix it there either. This is very inconsistent compared to how other translated strings get save in Theme Options in alternate languages.

    This behavior wasn’t clear to me when I first opened this ticket. I then fixed it by digging out record id’s in the database and putting those number in in another field in the strings overview somewhere .. but those got lost again when saving the theme options.

    So following the pdf instructions as you suggested, I found the field contact_slideout_page again … it was already ticked on but it cannot be found in the string translations page … regardless of whether I turn on “translate the theme and plugins” in localization …

    So what do you suggest. Is this a bug or am I missing a feature? 😉

    Cheers,
    Johan Peijnenburg
    (on behalf of Anette)

    #303365
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    The Theme Option name is ID sf_contact_slideout_page.

    Can you add a staging link so myself and the lead dev can take a look at your setup.

    Thanks.

    #303429
    anettemossbacher
    Member
    Post count: 68
    This reply has been marked as private.
    #304031
    David Martin – Support
    Moderator
    Post count: 20834

    Hi Johan,

    Thanks for your patience, I am still looking into this currently.

    – David.

    #304120
    anettemossbacher
    Member
    Post count: 68

    Hi David,

    No problem. For your information: I managed to get the sf_contact_slideout_page parameter back into the string translations overview for the string domain admin_text_sf_atelier_options domain again. And did some simulations to clarify what happens. See below. Hope this helps!

    The numbers in that sf_contact_slideout_page parameter are post-id’s of the pages in which the contact forms are included. I entered them manually after searching in the POSTS database table. So for instance, the French contact form has ID 5074. If I do query on that, I get 4 records: the record for the form itself (record 5074 obviously) and 3 other records which are the original page I included them in and two revisions. The last revision for the page is record 5155. Entering that number in the French translation string and saving it makes the slideout contact page work. I did this for all 4 translations. See screenshot “start situation”

    The big problem is that the theme options do not update the sf_contact_slideout_page correctly. When initially setting that theme option in English, it stores the record number of the page specified so in this case 417. When the page gets updated the sf_contact_slideout_page still will refer to 417 but the slideout does show the last revision.

    Now, what happens when I go to the theme options in French and specify the French contact page “Conctez-nous”:

    • The English theme options no longer shows the contact page originally specified
    • The sf_contact_slideout_page string now no longer stores the number of English page (417) but the record number of the original French contact page 3670
    • The sf_contact_slideout_page string now gets the status “translation needs update”. As a result the French contact form is shown for all languages.

    See screenshot “After changing to French” …

    So to get things working with the current set up of Atelier, I have to:

    • make sure the English contact page is set in the English theme options.
    • Search the database for each of the languages to find the record numbers of the last revisions of the contact pages in those languages
    • Enter those numbers manually in the sf_contact_slideout_page string, mark them complete and save all

    After that I’d better stay away from the header section of the theme options to not mess things up! 😉 Which actually is something you have to be really careful with anyway in Atelier anyway …. as might have noticed, you actually replaced all English strings in the admin_text_sf_atelier_options domain with Spanish ones, whilst trouble shooting the search results page language issue … yep, you did … Really! It is no problem though. It has happened to me also a couple of times as well and I have a separate text document on the side to quickly fix it when it does. I have’t put my finger on under which circumstances it happens. I guess something for a different thread 🙂

    Hope this helps!
    Johan

    Attachments:
    You must be logged in to view attached files.
    #304124
    David Martin – Support
    Moderator
    Post count: 20834

    Hi Johan,

    We work really closely with WPML to make sure we have totally compatibility with the plugin.

    I’d like to ask you to open a ticket with them detailing the above. If you can then ask them to email us regarding their findings we can work with them and located and implement a fix asap.

    Thanks,
    David.

    #304155
    anettemossbacher
    Member
    Post count: 68

    Hi David,

    But are you sure the problem with the contact page slideout lies with WPML then? To me it looks like the problem is with the Theme Options panel of Atelier … and I figure that’ll be the first response I will get … the contact-slideout is the only field with this behavior …

    Cheers,
    johan

    #304196
    David Martin – Support
    Moderator
    Post count: 20834

    Hi johan,

    We have our theme options set as per the WPML instructions, the option is within their recommended XML file.

    We work closely with them to resolve these issues but need them to also provide their feedback.

    Thanks.

Viewing 15 posts - 1 through 15 (of 25 total)

You must be logged in to reply to this topic.