Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Add Meta Tag For Different Language Rate Topic   - - - - -

 
  • alaa
  • Advanced Member
  • Trial users
  • Join Date: 18-Mar 18
  • 79 posts

Posted 25 January 2019 - 11:39 AM #1

Hi All, 

 

I have the following meta tag in meta.post.tpl

 

<meta property="og:site_name" content="Store Name" />

 

I want to apply a different value of "content" for another language for my multilingual store. So Something like the below: 

{if $current.language == "fr" }

 <meta property="og:site_name" content="Store Name in French" />

{/if}

Can you please correct my code above. It is not working!



 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 343 posts

Posted 25 January 2019 - 11:58 AM #2

You can have different meta for all languages you set.

 

Design -- Layout -- Homepage tab -- edit and change then the language to edit the other version

 

As for the other pages of your stores, you need a meta tag generator, or SEO templates



 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1238 posts

Posted 25 January 2019 - 12:26 PM #3

{if $smarty.const.CART_LANGUAGE == "fr" }

 <meta property="og:site_name" content="Store Name in French" />

{/if}


 
  • alaa
  • Advanced Member
  • Trial users
  • Join Date: 18-Mar 18
  • 79 posts

Posted 25 January 2019 - 07:20 PM #4

You can have different meta for all languages you set.

 

Design -- Layout -- Homepage tab -- edit and change then the language to edit the other version

 

As for the other pages of your stores, you need a meta tag generator, or SEO templates

 

Thank you imago for your suggestion. It seems that this section in the layout manager is not multilingual. 

 

 

{if $smarty.const.CART_LANGUAGE == "fr" }

 <meta property="og:site_name" content="Store Name in French" />

{/if}

 

This worked like a charm. Thank you Hungryweb. I have a question, please. Where can I get a full list of such variables? Normally, I check the frontend of my site with enabled debug. I found variables in Templates section as well as config. But like the one you mentioned it is not there.



 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 343 posts

Posted 25 January 2019 - 07:41 PM #5

It seems that this section in the layout manager is not multilingual. 

 

Sorry, if I misunderstood your request. Thought you were asking about this

 

hqxICE.jpg



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18798 posts

Posted 28 January 2019 - 07:34 AM #6

This worked like a charm. Thank you Hungryweb. I have a question, please. Where can I get a full list of such variables? Normally, I check the frontend of my site with enabled debug. I found variables in Templates section as well as config. But like the one you mentioned it is not there.

 

CS-Cart does not have list of available constants in the documentation. But you can use any php constant in this way. The most used are CART_LANGUAGE, DESCR_SL, CART_PRIMARY_CURRENCY and CART_SECONDARY_CURRENCY 


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • alaa
  • Advanced Member
  • Trial users
  • Join Date: 18-Mar 18
  • 79 posts

Posted 28 January 2019 - 08:50 AM #7

CS-Cart does not have list of available constants in the documentation. But you can use any php constant in this way. The most used are CART_LANGUAGE, DESCR_SL, CART_PRIMARY_CURRENCY and CART_SECONDARY_CURRENCY 

 

Good to know that, eComLabs. Thank you very much.