Skip to main content

Questions tagged [jtext]

0 votes
1 answer
65 views

I want to output a float price using a language constant like this: MYCONST_VAT="incl. %.2f&#37 VAT" So doing this: echo Text::sprintf('MYCONST_VAT', 19); outputs: incl. 19.00% VAT ...
maidan's user avatar
  • 463
3 votes
0 answers
150 views

I'm working on a component, and within the component configuration I have a selector for the admin to choose the date format to use when displaying items. It seems to me a perfect use-case for ...
Michael's user avatar
  • 743
2 votes
1 answer
833 views

I know at some point sprintf was a method of the JText class, but it doesn't seem to work in Joomla 4.0. I tried the following, not working: $str = Text::sprintf('...
thednp's user avatar
  • 415
1 vote
1 answer
178 views

I am trying to use Jlayout in a plugin I am writing and everything works fine except that the Language Constants in the layout file are not being replaced. My call to render the layout is; $layout = ...
Irata's user avatar
  • 4,691
2 votes
1 answer
427 views

How can I use language constant like JText::_('MY_STRING_FROM_INI_FILE') in external file? UPD: I include joomla system files require_once JPATH_BASE . '/includes/defines.php'; require_once ...
user3774771's user avatar
2 votes
2 answers
1k views

I managed to rewrite system plugin "Language Manager", so now it saves texts for different languages to Database (DB). Now I do not know how to rewrite JText (that is present across all the ...
Alex Ros's user avatar
2 votes
1 answer
623 views

I have an extension that displays the time a shout was posted, for example: 1 day ago This string is generated in my helper like so: $num . ' ' . JText::_('SHOUT_TIME') . ' ' . JText::_('SHOUT_AGO')...
Lodder's user avatar
  • 27k