The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sun Nov 20, 2011 11:51 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Sat Apr 25, 2009 9:20 pm
Posts: 272
Location: Minnesota (USA)
My goal is to override the terms used in a component's language file, and to do so in a way that my changes are not overwritten by component/extension updates.

I import a new language file using this code pattern:
Code:
$language->load('com_component_mine', JPATH_SITE, $language->getTag(), true);

The actual line of code can be placed at the top of an overridden view file. If the view does not need to be overriden, then the line of code can be added via a plugin tied to this extension.

From this custom language file, my new text overrides the text assigned to the same keys found in the component's language files.

example of overriding text within the customized language file:
Code:
JFIELD_ALIAS_LABEL="Page Name in URL"
COM_CONTENT_METADATA="SEO Options"


The 1.7 version of Joomla does include an override file, but all changes have to be added to one file per language. My objective is to provide a pattern for adding a custom language file per component/extension that allows me to adjust the wording per client and the client's vernacular.

(I initially posted here as a question, but edited this post into a statement after I discovered my answer.)

_________________
Randy Carey, the iCue Project : an intelligent approach to improving the CMS user experience


Last edited by imanickam on Mon Nov 21, 2011 1:00 am, edited 1 time in total.
Split the post from the thread http://forum.joomla.org/viewtopic.php?f=617&t=672285 as the discussions are different.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 



Who is online

Users browsing this forum: sugarandspice35 and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group