X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   How to call language label text? (https://forum.x-cart.com/showthread.php?t=74784)

sabinudash 12-10-2016 08:32 AM

How to call language label text?
 
Hi,

I added a new label (Translations > Edit labels > Add new label). How would I call the new label text on front pages?

Would you please share the code?

For Xcart 4, it used to be something like:
Quote:

{$lng.lbl_label_name}

What code should I use for Xcart 5?

Thanks for any help.

qualiteam 12-11-2016 09:57 PM

Re: How to call language label text?
 
In Twig templates you should use the t() function:
http://devs.x-cart.com/en/basics/twig_guide.html#t

In PHP classes you can use the static::t() method. For an example, see this article:
http://devs.x-cart.com/en/getting_started/step_4_-_working_with_settings/creating_custom_setting_class.html


All times are GMT -8. The time now is 09:05 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.