[Language Override] Custom JText for select list field

More
12 years 4 days ago #37755 by bobthebob01
Hi,

I'm using constant to build a select list so it can be translated. it's working fine excepted that that my variable are not picked up when using the content overrides of the admin panel.

it only works if i add them manually to the original language file. Which is not the best option since i'm likely to loose the translation during a future update.

But i guess it's not really an override that i am doing since the constant are not initially in the language file.

Does anybody know how i can achieve that?

Cheers

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

More
12 years 4 days ago #37768 by ggppdk
Hello,

please use this solution,
let's say that your joomla template is called 'mytemplate'

1. Create these language files

(frontend)
JOOMLA_FOLDER/templates/mytemplate/language/en-GB/en-GB.com_flexicontent.ini
JOOMLA_FOLDER/templates/mytemplate/language/en-GB/fr-FR.com_flexicontent.ini

(backend)
JOOMLA_FOLDER/administrator/templates/mytemplate/language/en-GB/en-GB.com_flexicontent.ini
JOOMLA_FOLDER/administrator/templates/mytemplate/language/en-GB/fr-FR.com_flexicontent.ini



2. Add this code (this change will be included in v2.0.3 final)
Code:
$templateDir = JURI::base() . 'templates/' . JFactory::getApplication()->getTemplate(); JFactory::getLanguage()->load('com_flexicontent', $templateDir, 'en-GB', true); JFactory::getLanguage()->load('com_flexicontent', $templateDir, null, true);


(frontend)
add the above code to file
components/com_flexicontent/flexicontent.php
just before:
Code:
// Perform the Request task $controller->execute($task);

(backend)
add the above code to file
administrator/components/com_flexicontent/admin.flexicontent.php
just before:
Code:
// Perform the requested task $controller->execute( JRequest::getCmd('task') );

NOTE 1: I did not test yet it should work (also test backend), please test and report back

NOTE 2: For adding language files overrides for any extension please read this:
www.yireo.com/tutorials/joomla/j ... a-template


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 3 days ago #37775 by micker
interesting solution ;)

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.282 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save