How to translate button?

kostianev
75 Posts
kostianev posted this 29 July 2018

Dear, how to translate button text and link for multilanguage site? See the attachment.

Dear, how to translate button text and link for multilanguage site? See the attachment.
Vote to pay developers attention to this features or issue.
1 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 30 July 2018

Hi,

Unfortunately, there is no easy way to translate the title of the Button control, unfortunately.
Joomla needs the translated text to be wrapped into the PHP translation function. For example:

<?php
echo JText::_( 'Welcome' );
?>

In this case, if you have the following key in the translation file the "Welcome" text will be translated:
WELCOME=Welcome!

Themler Button control is a static HTML element.
As an alternative you can replace Button control with CMS Code control:
<a class="bd-button" href="#"><?php echo JText::_( 'Welcome' ); ?></a>
In this case you will need to add transkation key into the translation file(s).

This should help.

Thank you,
Olivia

Hi, Unfortunately, there is no easy way to translate the title of the Button control, unfortunately. Joomla needs the translated text to be wrapped into the PHP translation function. For example: `<?php echo JText::_( 'Welcome' ); ?>` In this case, if you have the following key in the translation file the "Welcome" text will be translated: `WELCOME=Welcome!` Themler Button control is a static HTML element. As an alternative you can replace Button control with CMS Code control: `<a class="bd-button" href="#"><?php echo JText::_( 'Welcome' ); ?></a>` In this case you will need to add transkation key into the translation file(s). This should help. Thank you, Olivia
You must log in or register to leave comments