S Page wrote:
>
>> What is the scope of $wgLanguageCode? 
>
> It's a wiki global, hence "wg".  If you want to access a $wg value, 
> just declare
>     global $wgLang;
> at the top of your function, don't pass it around.  You *may* be able 
> to get away without this global line for some $wg variables, but don't 
> rely on it.
>
>
> I hope this helps, I'd love to be proven wrong.
> -- 
You were not wrong.

In fact, what you just said--the "global" declaration--was the one thing 
that I had not thought to include in my object-method code. When I 
declared $wgLanguageCode as a global variable, I gained access to it. So 
now my repetition of Julian or Gregorian dates displays exactly as I 
wanted it to--in the language of the wiki.

Thank you very much for reminding me that sometimes the simplest 
solutions are best.

Terry A. Hurlbut


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to