Okay
  Public Ticket #2135333
Email translation
Closed

Comments

  •  3
    Martin started the conversation

    Hi, I have a question about how to translate notifications. I am using Polylang and Loco Translate. I was able to translate strings, but now I am not sure how to translate emails since when I switch language, the message is still same in all languages when I change anything in 1 language.

    I also tried to clear browser cache since plugin is ajaxified.

  •  2,498
    Aleksandar replied

    Hello Martin.

    The e-mail templates are dynamic strings, and are not affected by translation strings. 

    If you wish to change them to a different language, the whole WordPress has to be in that same language. Or simply translate them manually.

    Sorry for the inconvenience.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  3
    Martin replied

    I am a bit confused. I am able to change the message "Notification" in settings Notifications. For example setup follow up message content. But this does not work for different languages. So when I do have 1 website with 2 languages, how can I translate it? Change some HTML files?

    When I switch language, it still keeps 1 text, see the screenshot, this message is always same for all languages. How can I setup notification messages to all languages used by the wp website in polylang? Is there any way?

  •  2,498
    Aleksandar replied

    Hello again Martin.

    When you're using dynamic translating plugins like PolyLang, WPML or Weglot, you need to have a .po file for the language you wish the plugin to be translated in.

    If you were to change the WordPress's language to one that Amelia has a translation for (for example German), everything will automatically be translated. But, the thing is that we don't have the Czech language file, so you would have to create it.

    Words can be changed using POEDIT or Loco Translate for example very easily. I suggest you to install Loco Translate and then to translate these string.

    If you want to use POEDIT then this is an instruction:

    1. Download the Amelia plugin from our TMS Store or from email that you receive when you purchase our plugin and save the .zip file on your computer.

    2. Unzip downloaded .zip file.

    3. You need to download and install POEDIT

    4. After that open the program and open the file from the extracted folder on your computer ameliabooking/languages/en_US/wpamelia-en_US.po.

    5. Translate all the strings on your language.

    6. Save the file as it suggests to you (the language code; for example wpamelia-id_ID.po if your language is Indonesian) and it will be generated new  wpamelia-id_ID.mo file. Find your language code here

    7. Go to ameliabooking/languages/ folder and make new folder and call him as language code for your language (in our case for Indonesian is id_ID) and  then copy these two files called wpamelia-id_ID.po and wpamelia-id_ID.mo and then copy hole folder id_ID back to your website in the location ../wp-content/plugins/ameliabooking/languages/.

    Of course, you will use language code for your language (we use Indonesian language and his language code is  id_ID just as example)

    When you finish that it would be nice to send us that translation, so we can include in next major update so you don't have to copy this folder from local machine on every update.

    Hope this helps. If you have any more questions, don't hesitate to ask.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  3
    Martin replied

    Hi Aleksandar,

    I know how translation in WP works, I know I have to translate POT file. Actually I have the translation already done for strings.

    But how do I translate emails? I mean notification section in Amelia plugin. These are not included in POT file, this is saved directly into the database, but the inputs for notification does not respect language. This way I have same email for every language, for example "Follow up notification".

    The client has the page in English and Czech, so when his customer makes an appointment on CZ version, he has to receive email with FollowUp in Czech, when he makes an appointment in English, he has to receive email in English. And I am not sure how to do this.


    Is it more clear what I need to know?

  •  2,498
    Aleksandar replied

    Hello again Martin.

    That's what I understood in your initial comment.

    What I don't understand, though, is if you want to translate the body of the e-mail or the names of notifications on the left. If you're talking about the body of the e-mail, I already replied to that, saying that e-mail templates are dynamic strings, and are not affected by translation strings from the .po file.

    So, from your screenshot I see this:

    4834205796.png

    If you translated the .po file into Czech, these strings should all be translated, as they are translated for German:

    7328961048.png

    But, even if the plugin is translated into German, the body of the e-mail still stays in English:

    9622765247.png

    When you retype this in another language, it is stored in the database in a different language, and this being dynamic strings means .po files are not affecting the bodies of e-mails - just like you said:

    These are not included in POT file, this is saved directly into the database

    Notifications, service names and service categories' names cannot be translated, but only retyped.

    Kind regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  3
    Martin replied

    Ok, but this is quite limiting to not to be able to translate the body and subject when you have a site with 2 languages.

  •  2
    Alžběta Vybíralová replied

    Hello,

    it is really sad to find out that we can't translate the e-mail body and subject. :( We also have a site with 2 languages. This way we are forced to send bilingual e-mails.

    Please think about adding support for translating these in some new release.

    Thanks!

    Betty

  •  2,498
    Aleksandar replied

    Hi all.

    I understand your disappointment, but unfortunately I don't believe our team will be able to do anything with this, and the request would have to be turned to the translator plugin's team.

    Dynamic strings are user created and saved in the plugin or theme options, in user meta or in a custom table the translation plugin doesn’t know about. In our case that's the "wp_amelia_notifications" table in the database. This is something that users can change from within the plugin - a dynamic string, similar to the service's name. So - defining a service's name will stay the same no matter what language you translate the plugin to. If you change the name to "Allemagne" for French, it will not automatically be changed to "Deutschland" when you switch to German, or "Germany" when you switch to English. It is something you typed in yourself, and that cannot be changed so easily.

    Same goes for Notification templates. They are template e-mails which you can (should) change to be specific to your use case. That is why, for example, if you're using "Language Tool" or "Gramarly" chrome add-ons - they have to be turned off when you're changing the Notification templates, because if you use these spell-checking add-ons they will overwrite the Notifications content in the database itself, and you will wind up with a blank template.

    You would need to reach out to WPML, Weglot, PolyLang or whichever translator plugin you're using for multi-language website, and ask them how you can add the dynamic strings into the translation. You now have the database table we're using for the Notifications, so if there is a solution to this, they'll probably help you out.

    Kind regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  3
    Martin replied

    Hi Aleksandar,

    I think the problem is a bit more complex. You are able to send notification and it is actually not hard to modify the code to make notifications multilingual with polylang, WPML,... but it is hard to do this inside the plugin since a lot of code is complied JS. + one more issue is that when you save an appointment, it does not store information about the language (for follow-up notification).

    1 solution I have in mind would be to modify notifications to fire some event (action) and this way you could be able to create a custom code which can send translatable emails. This would ofcourse require a developer on client's side or someone to write an extension. Is there some possibility? Maybe some action already exists which could tell me what template should be sent.

  •  2,498
    Aleksandar replied

    Agreed, Martin.

    Unfortunately we don't have hooks (action and filters) at the moment. What we have is a few JS hooks that is triggered depends on the view:

    window.beforeAddToCalendarLoaded()
    window.beforeBookingLoaded()
    window.beforeSearchLoaded()
    window.beforeSearchFiltered()
    window.afterSearchFiltered()
    window.beforeConfirmedBooking()
    window.beforeCatalogLoaded()
    window.afterSelectCatalogCategory(object_category)
    window.beforeCatalogCategoryLoaded(object_category)
    window.beforeCatalogServiceLoaded(object_category, object_service)
    window.afterSearchActivateService(object_appointment, object_serviceActive)
    window.afterSearchGoToSecondStep(object_appointment, object_serviceActive)
    window.afterBookingSelectDateAndTime(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.afterBookingSelectService(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.beforeConfirmBookingLoaded(object_appointment, object_service, object_provider, object_location)
    window.afterConfirmBooking(object_appointment, object_service, object_provider, object_location)

    JS files are modified (minimized) in public version of plugin (in our development environment is accessible), but unfortunately I can not send you our source code because that is the policy of our company.

    All those files that have extension .vue are compressed and minimized in JS files that is very hard and not recommended modifying. So in order to add some other features you can unminify the js and customize it.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  1
    Dev replied

    I like to tap into this conversation from 2019, as this is an ongoing issue. We are evaluating Amelia for a rather big project in Switzerland and translation is the major discerning factor here:

    Transactional communications with customers is the most important asset in a booking tool, right after the function of making an appointment of course. Switzerland has four national languages and we must serve all of them. And we don't see this as something that a customers should have to somehow find out without a proper code documentation at hand.

    And the issues go further: Amelia re-uses the same strings on multiple occasions, whereas languages other than English discern strongly between terms meanings by context. A simple example is "Cancel", which must be translated with "Abbrechen", "Zurück", "Stornieren" and "Kündigen" in German, depending on where there are used during a booking. There are multiple examples for that. So far, translation seems more like an afterthought with Amelia than an important concept.

    I like to raise awareness for this and ask TMS to get behind it:

    TMS should collaborate with WPML and/or LocoTranslate directly to implement a thorough translation of the complete plugin, beginning with the front-end. 

    For example, WPML has an add-on plugin available for WP-Forms/Formiddable, which let users translate every single phrase, word and string. But this can only be done if you as developers reach out to WPML and start working with them.

    We compared all available booking plugins as well as standalone booking solutions available as of now over the recent weeks. Amelia is by far the strongest but the lack of proper translation let it fall completely short of the needs for an Non-English speaking target audience. 

    If this is a non-issue for you as developers of Amelia, please state this clearly. It will help buyers as well as potential customers a clear understanding of Amelia's real capabilities and your stance on multinational customers as developers.

    Thank you.


  •  2,498
    Aleksandar replied

    Hello Dev

    Thank you for reaching out to us again.

    Unfortunately, at the moment we cannot say that Amelia can be translated easily with any language tool. We're having the same issue you're mentioning with a lot of other languages, including our own (Serbian) - we have 7 grammar cases, and it's extremely difficult to make Amelia be properly translated.

    We've recently hired new developers, so we have more manpower. They've started exploring our options with WPML, Polylang, etc and I hope that a decision will be made soon, and we'll move toward this being resolved soon. Thank you for telling us about the add-on for WPML, so each word is translatable. I will forward this info to our developers.

    Translation is becoming a pretty big issue with Amelia, so I'll make sure this is highly positioned on our "to-do" list. I can't make any promises as to when the plugin will be ready for WPML or other multi-lingual plugins, but I can promise that we are working on it.

    At the moment - it's not compatible, and we can't make it compatible in the near future.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables