Jump to content

clem_dahms

New Members
  • Posts

    1
  • Joined

  • Last visited

clem_dahms's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.