Translate "Cart"

sdbb
8 Posts
sdbb posted this 03 July 2017

Hi

where can i translate the word "Cart" next to the shopping basket in header?

Hi where can i translate the word "Cart" next to the shopping basket in header?
Vote to pay developers attention to this features or issue.
8 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 06 July 2017

Hi,

Could you please try adding the following code to the Themler Settings >> CMS Code:

add_filter( 'gettext', 'wps_translate_words_array' );
add_filter( 'ngettext', 'wps_translate_words_array' );
function wps_translate_words_array( $translated ) {
$words = array(
// 'word to translate' = > 'translation'
'Cart (%s)' => 'ADD TRANSLATION HERE (%s)',
);
$translated = str_ireplace( array_keys($words), $words, $translated );
return $translated;
}

It should help. Looks like you do not have this key in the translation files.

Thank you,
Olivia

Hi, Could you please try adding the following code to the Themler Settings >> CMS Code: `add_filter( 'gettext', 'wps_translate_words_array' ); add_filter( 'ngettext', 'wps_translate_words_array' ); function wps_translate_words_array( $translated ) { $words = array( // 'word to translate' = > 'translation' 'Cart (%s)' => 'ADD TRANSLATION HERE (%s)', ); $translated = str_ireplace( array_keys($words), $words, $translated ); return $translated; }` It should help. Looks like you do not have this key in the translation files. Thank you, Olivia
Vaidas B
6 Posts
Vaidas B posted this 20 December 2017

Hello,
I am new in themler. Where to find Themler Sttings>> CMS Code to put it?
Thanks

Hi,

Could you please try adding the following code to the Themler Settings >> CMS Code:

add_filter( 'gettext', 'wps_translate_words_array' );
add_filter( 'ngettext', 'wps_translate_words_array' );
function wps_translate_words_array( $translated ) {
$words = array(
// 'word to translate' = > 'translation'
'Cart (%s)' => 'ADD TRANSLATION HERE (%s)',
);
$translated = str_ireplace( array_keys($words), $words, $translated );
return $translated;
}

It should help. Looks like you do not have this key in the translation files.

Thank you,
Olivia

Hello, I am new in themler. Where to find Themler Sttings>> CMS Code to put it? Thanks > Hi, > > Could you please try adding the following code to the Themler Settings >> CMS Code: > > `add_filter( 'gettext', 'wps_translate_words_array' ); > add_filter( 'ngettext', 'wps_translate_words_array' ); > function wps_translate_words_array( $translated ) { > $words = array( > // 'word to translate' = > 'translation' > 'Cart (%s)' => 'ADD TRANSLATION HERE (%s)', > ); > $translated = str_ireplace( array_keys($words), $words, $translated ); > return $translated; > }` > > It should help. Looks like you do not have this key in the translation files. > > Thank you, > Olivia
Vaidas B
6 Posts
Vaidas B posted this 20 December 2017

Hi,
I find out where this CMS Code, but it didn't helped to translate "Cart" next to basket

Hello,
I am new in themler. Where to find Themler Sttings>> CMS Code to put it?
Thanks

Hi,

Could you please try adding the following code to the Themler Settings >> CMS Code:

add_filter( 'gettext', 'wps_translate_words_array' );
add_filter( 'ngettext', 'wps_translate_words_array' );
function wps_translate_words_array( $translated ) {
$words = array(
// 'word to translate' = > 'translation'
'Cart (%s)' => 'ADD TRANSLATION HERE (%s)',
);
$translated = str_ireplace( array_keys($words), $words, $translated );
return $translated;
}

It should help. Looks like you do not have this key in the translation files.

Thank you,
Olivia

Hi, I find out where this CMS Code, but it didn't helped to translate "Cart" next to basket > Hello, > I am new in themler. Where to find Themler Sttings>> CMS Code to put it? > Thanks > > > Hi, > > > > Could you please try adding the following code to the Themler Settings >> CMS Code: > > > > `add_filter( 'gettext', 'wps_translate_words_array' ); > > add_filter( 'ngettext', 'wps_translate_words_array' ); > > function wps_translate_words_array( $translated ) { > > $words = array( > > // 'word to translate' = > 'translation' > > 'Cart (%s)' => 'ADD TRANSLATION HERE (%s)', > > ); > > $translated = str_ireplace( array_keys($words), $words, $translated ); > > return $translated; > > }` > > > > It should help. Looks like you do not have this key in the translation files. > > > > Thank you, > > Olivia
Vaidas B
6 Posts
Vaidas B posted this 20 December 2017

It helped,
thanks

It helped, thanks
Support Team
Support Team posted this 20 December 2017

Hi,

You are welcome. Feel free to contact us in any other occasion.

Sincerely,
Hella

Hi, You are welcome. Feel free to contact us in any other occasion. Sincerely, Hella
Vaidas B
6 Posts
Vaidas B posted this 20 December 2017

Hi,
but still is a problem. Translation apears only then the product is added. If cart is empty, no translation and the text is "Cart"
Could you please help to solve this :)
Thanks

Hi, but still is a problem. Translation apears only then the product is added. If cart is empty, no translation and the text is "Cart" Could you please help to solve this :) Thanks
Support Team
Support Team posted this 22 December 2017

Hi,

The 'Cart (%s)' and 'Cart' are two different translation keys. Please add translations for both.

Thank you,
Olivia

Hi, The `'Cart (%s)'` and `'Cart'` are two different translation keys. Please add translations for both. Thank you, Olivia
Vaidas B
6 Posts
Vaidas B posted this 29 December 2017

Thank you Olivia :)

Thank you Olivia :)
You must log in or register to leave comments