Home › Forums › WoodMart support forum › Can’t translate a string
Can’t translate a string
- This topic has 7 replies, 2 voices, and was last updated 8 months ago by
Luke Nielsen.
-
AuthorPosts
-
November 7, 2024 at 6:17 pm #610579
dweb360ParticipantHello
Can’t translate the “Out of stock” for a variable product! Even using functions.phpfunction custom_text_replace( $translated_text, $untranslated_text, $domain ) { switch ( $untranslated_text ) { case 'Rupture de stock': $translated_text = __( 'Bientôt disponible', $domain ); break; // Leave the default case out when using languages other than en_US default: $translated_text = $untranslated_text; break; } return $translated_text; } add_filter( 'gettext', 'custom_text_replace', 20, 3 );
Thank you
-
This topic was modified 8 months, 1 week ago by
dweb360.
November 8, 2024 at 10:04 am #610661
Luke NielsenKeymasterHello,
I suggest you use the Loco Translate plugin:
https://xtemos.com/docs-topic/translate-woodmart-theme-with-loco-translate/
Let me know the result.
Kind Regards
November 13, 2024 at 12:37 pm #611849
dweb360ParticipantHello
I’m already using Loco Translate but can’t found the string “Out of stock” for a variable product.
Thank you-
This reply was modified 8 months ago by
dweb360.
November 13, 2024 at 1:05 pm #611866
Luke NielsenKeymasterHello,
I see that you have already translated it – https://prnt.sc/7-PlMyEQS3RA
Clarify the issue. Thank you for your time.
Kind Regards
November 13, 2024 at 1:28 pm #611872
dweb360ParticipantHello
I want to change the string in french from “Rupture de stock” to “Bientôt disponible”
Can’t found it
Thank youNovember 13, 2024 at 4:12 pm #611919
Luke NielsenKeymasterHello,
Try to change it via the settings of your plugin – https://prnt.sc/5FN_sDER9-0T
https://translatepress.com/docs/translation-editor/
Kind Regards
November 14, 2024 at 4:34 pm #612192
dweb360ParticipantHello
Not working because it seems that “Out of stock” is added dynamically
Thank youAttachments:
You must be logged in to view attached files.November 14, 2024 at 4:41 pm #612195
Luke NielsenKeymasterHello,
If there – https://prnt.sc/usHV72C2aLmf is not possible to change the text, I suggest you contact the plugin’s support because that functionality creates the translation plugin.
Let me know the result.
Kind Regards
-
This reply was modified 8 months ago by
Luke Nielsen.
-
This topic was modified 8 months, 1 week ago by
-
AuthorPosts
- You must be logged in to create new topics. Login / Register