Hi,
I am quite new to php coding and I am trying to write a simple function.
The aim of this function is to print a small bit of html code when it is called.
Also I have 2 languages on my website so I have added an "if" so that I can call the write text depending on the language chosen by the user.
Here is the code I have so far but it is not working yet :
function delivery_title() {
$current_lang = get_locale();
$text_clem = '';
if ($current_lang == 'fr_FR'): {
$text_clem = 'LIVRAISON'
} else: {
$text_clem = 'DELIVERY'
}
endif;
echo '<span id="order_review_heading" class="checkout_header">';
echo $text_clem;
echo '</span>';
}
Would you guys be able to help me make this small function work properly ?
Thanks a lot !
Very best,
Clément