Questions tagged [jtext]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

Special character (%) in language string

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
  • 403
3 votes
0 answers

Why can I not use a params variable for the JText translation constant?

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
  • 593
2 votes
1 answer

Joomla 4.0 Text sprintf

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

Language Constants not being replaced in JLayout

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
  • 3,822
2 votes
1 answer

Using language constants in external file

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

How to rewrite JText to get my custom text translations from Database and not from files

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

JText - multilingual string order

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::_('...
Lodder's user avatar
  • 26.9k