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
|
 |
 |
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 |
 |
 |
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
|
 |
 |
|