The Joomla! Forum ™



Forum rules


Please use the Forum Post Assistant to give your server setting details which are necessary to determine the problem.



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Language overrides
PostPosted: Thu Dec 02, 2010 1:27 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Nov 08, 2006 12:16 pm
Posts: 20
Hi There,

I have been playing with J! 1.6 (b14 atm) and so far all looks really really nice.

I have one question however, regarding overriding the default text with language files. One thing I have loved about J! is the layout overrides, but it has often frustrated me that language files are not treated is the same way.

I notice that in the J! 1.6 structure, there is a folder /language/overrides and I am trying to work out exactly how it functions. For example, I want to change the default text for mod_login, so I have copied /language/en-GB/en-GB.mod_login.ini into the override folder, and then made modifications. However these changes do not seem to have taken. I also created the folder /language/overrides/en-GB and put the modified language file in there, but it does not seem to be changing the text in the front end.

Can anyone explain how the language override structure is supposed to work? How can I make small changes like changing MOD_LOGIN_HINAME to be "Logged in as %s" instead of "Hi %s" ?

Thanks,

Micha


Top
 Profile  
 
 Post subject: Re: Language overrides
PostPosted: Fri Dec 03, 2010 12:52 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Wed May 09, 2007 10:07 am
Posts: 303
Location: Rome
I did something like that just creating a file named en-GB.override.ini inside language/overrides folder. Put in it the whole strings you need to change. It should work.

ricc.

_________________
http://www.unframe.com


Top
 Profile  
 
 Post subject: Re: Language overrides
PostPosted: Fri Dec 03, 2010 1:33 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Nov 08, 2006 12:16 pm
Posts: 20
I saw that in the language.php class file. I think it would be worthwhile allowing individual override files on a per-extension basis. It could be done in the JLanguage::loadLanguage() function fairly easily. Replace the override processing in JLanguage::__construct() with simply setting an override path. Then use that path in the loadLanguage() function to load and merge an extension specific override file after you have merged the default extension specific language file.

The issue with a single override file is that it makes automated processing of the language overrides difficult. Consider language overrides in a similar way to layout overrides. They are more than simply translation mechanisms - they also allow a change to the whole tone of the site, through formal, colloquial, or artificial language.


Top
 Profile  
 
 Post subject: Re: Language overrides
PostPosted: Tue Apr 19, 2011 7:41 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Sun Dec 28, 2008 3:25 pm
Posts: 60
Location: Sweden
Thank you rufuz! It works fine :-)

Greetings
Anna

_________________
Jomlare in Sweden :-)
http://www.formfranska.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 



Who is online

Users browsing this forum: No registered users and 6 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