I am using the Amelia plugin and I am struggling with the translation of date and time. I am using the qtranslate-X-Plugin, which uses e.g. for German and English the shortcode [:de]text in German[:en]text in English[:]
Now on my Amelia booking calendar I would like to have different versions of date and time for both available languages. I have tried many options, but the calendar plugin itself only takes the preset of the Wordpress General settings and not the translated strings of qtranslate-X. The translation of date and time works fine on the website, but does not work with Amelia.
If I use the shortcode in the Wordpress General settings
e.g.: [:de]d.m.Y[:en]F j, Y[:]
the translation works in the booking calendar. The problem then is, that the calendar of Amelia on the backend of Wordpress or in the employee/customer panel doesn't know the shortcode of qtranslate-X and uses the [:de] and [:en] as a php date format string.
So either way, I didn't find a solution, which can show all versions translated correctly. If you need more information, please let me know. Or if I can translate the date and time format somewhere in the amelia plugin itself, that would be great.
Unfortunately, we can't say if and how will Amelia work with custom time formats/formats added by another plugin to WP. The time format that you choose in WP General Settings is applied to Amelia as well, but we can't guarantee any custom formats or some plugin's formats would work well within Amelia, unfortunately. I will forward this to one of our developers so they could check it out and see if there is any solution to this, and will get back to you as soon as I get some feedback from them.
You can maybe solve the issue with changing the way these formats are applied in Amelia. So, you can maybe solve the issue by changing one of Amelia's files, so please try changing this file
thank you so much for the effort of helping me. I don't really know how I managed to do it, but I tried around and finally I got it going with the following lines in the SettingsStorage.php:
Glad to see you managed to find a way to achieve what you needed , thank you for letting us know and for sharing. You are welcome! I'm glad we could be of help.
If you have any other questions or concerns feel free to open a new ticket and we will gladly help out.
Hey to everyone!
I am using the Amelia plugin and I am struggling with the translation of date and time. I am using the qtranslate-X-Plugin, which uses e.g. for German and English the shortcode [:de]text in German[:en]text in English[:]
Now on my Amelia booking calendar I would like to have different versions of date and time for both available languages. I have tried many options, but the calendar plugin itself only takes the preset of the Wordpress General settings and not the translated strings of qtranslate-X. The translation of date and time works fine on the website, but does not work with Amelia.
If I use the shortcode in the Wordpress General settings
e.g.: [:de]d.m.Y[:en]F j, Y[:]
the translation works in the booking calendar. The problem then is, that the calendar of Amelia on the backend of Wordpress or in the employee/customer panel doesn't know the shortcode of qtranslate-X and uses the [:de] and [:en] as a php date format string.
So either way, I didn't find a solution, which can show all versions translated correctly. If you need more information, please let me know. Or if I can translate the date and time format somewhere in the amelia plugin itself, that would be great.
Thank you and all the best,
Philipp
Hello Philipp,
Unfortunately, we can't say if and how will Amelia work with custom time formats/formats added by another plugin to WP. The time format that you choose in WP General Settings is applied to Amelia as well, but we can't guarantee any custom formats or some plugin's formats would work well within Amelia, unfortunately. I will forward this to one of our developers so they could check it out and see if there is any solution to this, and will get back to you as soon as I get some feedback from them.
Dear Marija,
thank you. I still tried to find different solutions, but couldn't get everything to work.
Looking forward to hearing back from you and the developers.
Thank you and best regards,
Philipp
Hello Philipp,
You are welcome.
You can maybe solve the issue with changing the way these formats are applied in Amelia. So, you can maybe solve the issue by changing one of Amelia's files, so please try changing this file
src/Infrastructure/WP/SettingsService/SettingsStorage.php
and change this line in that file :
to something like this:
Please look at the attachments.
You would need to apply this change after each update of Amelia.
Hello Marija,
thank you so much for the effort of helping me. I don't really know how I managed to do it, but I tried around and finally I got it going with the following lines in the SettingsStorage.php:
for date:
for time:
Wonderful help as always.
All the best,
Philipp
Hello Philipp,
Glad to see you managed to find a way to achieve what you needed , thank you for letting us know and for sharing. You are welcome! I'm glad we could be of help.
If you have any other questions or concerns feel free to open a new ticket and we will gladly help out.