Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Multilanguage for JDOM 15 Apr 2012 06:05 #1989

How can I use the component generated language variables into JDOM output?

Please Log in or Create an account to join the conversation.

Re: Multilanguage for JDOM 15 Apr 2012 08:45 #1995

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
In JDom, you can call getExtension() to return the current component alias 'com_xxxx'.

With that, you can reconstruct a language var.

Second possibility is to send them in parameters of the control that need it (declare them in __construct)
(see example in html.form.input.select)
Coding is now a piece of cake
The following user(s) said Thank You: Tomaselli

Please Log in or Create an account to join the conversation.

Re: Multilanguage for JDOM 15 Apr 2012 10:27 #1998

Thanks, admin you pointed me to the right direction.
for anyone who may need it, this is how I did:

added the following code in PHP file of the jdom item:
$language = JFactory::getLanguage();
$language->load('com_XXXX');


then you can just use the variable. for example:

$strYES = "COMXXXX_FIELD_ONLINE";
$strNO = "COMXXXX_FIELD_OFFLINE";

for reference:
docs.joomla.org/Specification_of_language_files
The following user(s) said Thank You: devil

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.057 seconds

I've evaluated lots of other Joomla Component Dev tools such as Shell Manager (J)enesis Danny's Joomla! 1.5 MVC Component Code Generator Marco's Component Maker and I must admit that I love what I see on your site! Lots of potential... Otherwise Great Job and keep up the good work!!!
Clifton (forum)

Get Started