brion(a)svn.wikimedia.org schrieb:
Revision: 25781
Author: brion
Date: 2007-09-11 15:22:53 +0000 (Tue, 11 Sep 2007)
Log Message:
-----------
Reverting r25772 for now.
The local language names as title are a cute feature, but a few problems:
* It only seems to use the values for the content language for this, though UI language
would be more appropriate.
* A hojillion wfMsg() calls are made when Names.php is loaded, which feels kind of icky
to me. Would trigger message cache initialization early and does a lot of extra calls not
needed 99% of the time.
I'd rather only load values when required.
Ok, I see your points.
What do you think about the following method:
1. Define an array per language in /languages/localNames/localNamesXx.php
In a similar way the native language names are definded in Names.php
2. Read this array in /languages/messages/messagesXx.php:
require_once( dirname(__FILE__) .
'/languages/localNames/localNamesXx.php' ) ;
Benefits from this method should be:
1. No hojillion wfMsg() calls ;-)
2. localNamesXx.php could be created/updated by a script from a source
like
http://www.unicode.org/cldr/data/charts/summary/en.html (Idea by
Nikerabbit, thanks :)
Raymond.