Skip to content
Advertisement

Tag: gettext

Change admin dashboard WooCommerce widget title

I want to change the WooCommerce dashboard widget title from ‘WooCommerce Status’ to something else. I understand that I need to use a hook in my functions.php but I’m struggling to make this work. I’ve found the function and the file in WooCommerce that is generating the dashboard widget ( plugins/woocommerce/includes/admin/class-wc-admin-dashboard.php ) – and I’ve attempted to use add_action to

How to use Poedit with smarty templates?

I’m using PoEdit on smarty templates (phtml and tpl files) with the following Poedit configuration for PHP parser : Extensions: Parser command : If i’m using gettext inside PHP tags <?php _(‘test’); ?> Poedit detect that translation as expected. But i’m using Smarty {_(‘test’)} for displaying the translation, Poedit don’t detect it. Is there a way to make Smarty detect

Gettext not working, what’s wrong?

I’m using gettext for adding different translations into my webpage. I’ve just installed it and I think it works fine. I also use Poedit for the .po files. This is the code I have for my gettext …

Gettext will always use system default locale

I need to localise a Windows-only PHP web application and I’m evaluating the gettext extension but I’m having the hardest time trying to make it work in my Windows 7 development box. I’ve used trial and error together with Process Monitor to overcome the poor and inaccurate documentation and I’ve managed to make _() display strings from the *.po catalogue

Gettext or database translation

Which is better: gettext custom MySQL+cache based functionality Gettext is a sort of builtin feature, so I assume it’s tweaked for performance. Using poedit is a pain and impossible to show to any client. A custom functionality allows for simple translation interface. But might be heavy on php/db usage. I suppose, which one would you use when? Answer Localization is

Advertisement