CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Override language file translations

Print topic Send  topic

Author Message
paulmason411


Posts: 127
Posted: 07/28/2009, 8:48 PM

Is there anyway to do this? I got pretty close, this is what I did.

1) Added the the key 'test_msg' & the text 'default test msg' to the default language file which is located under Resources->Locales->English(Default)

2) added the translation to my page.

3) In the page before show I added this code:
global $CCSLocales;  
$CCSLocales->Locales[$CCSLocales->DefaultLocale]->Messages["test_msg"] = "this is the test message";  
echo "test: ".$CCSLocales->GetText('test_msg');  

the echo works but the translation has the default message.

Maybe i need to place the code somewhere in between the time the $CCSLocales is initialised and the translation is parsed?

Any ideas would be appreciated, cheers.


_________________

http://paulmason.name - Web Development Blog

View profile  Send private message
jjrjr1


Posts: 942
Posted: 07/29/2009, 8:35 AM

Maybe try () instead of [] in the methods for setting the new default value.

_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
paulmason411


Posts: 127
Posted: 07/29/2009, 6:37 PM

I just had a look in the Classes.php file and it has a class called clsLocale with the function GetMessage(), however it did not contain a function called SetMessage(). Maybe it has been developed this way so that Messages can't be overridden?
_________________

http://paulmason.name - Web Development Blog

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.