Manual talk:$wgLanguageCode

From mediawiki.org

Outdated documentation?[edit]

Is this outdated at least from version 1.13? I don't see any Language.xx.php files. I have a ./languages/Labguage.php & many ./languages/messages/MessagesXX.php files.

Missing LanguageDe.php[edit]

I just installed xamp and mediawiki.

But LanguageDe.php is missing.

I cant find a forum about Media Wiki so i just ask this Question here.

where is rebuildmessages.php???[edit]

rebuildmessages.php???

I downloaded the 1.9.3 and I can't find rebuildMessages.php in maintenance directory and I see the page as the mix of two languages Thai and English. Is this expected? 131.215.7.198 05:57, 22 April 2007 (UTC)Reply

rebildMessages is no longer required, starting with mw 1.9. Did you go through the full upgrade procedure? Did you accidentally change the content language of your wiki to english? -- Duesentrieb ⇌ 11:04, 22 April 2007 (UTC)Reply

i found "rebuild" "-rebuild" and "--rebuild" on the web[edit]

Hello, I was a little confused over how to start rebuildMessages.php in order to update mediawiki message entries in the database to the new language.

I couldn't test myself so I wanted to guess right (I found "php rebuildMessages.php -rebuild", "php rebuildMessages.php rebuild" and "php rebuildMessages.php --rebuild" on the internet.

The command that worked (executed by my ISP) was php4-cgi rebuildMessages.php --rebuild ../languages/LanguageDe.php for the "De"-language file. I suppose that adding the filename isn't necessary, but it seems so far that it works.

And it seems there is no easy way to run this command if you don't have shell access and php safe mode is turned on.

I guess you'll have to create a file that just executes require_once( "commandLine.inc" ); include_once( "InitialiseMessages.inc"); if ( YOUWANTFILEBOOLEAN ) { $messages = loadLanguageFile( FILENAMESTRING ); } else { $messages = false; }

initialiseMessages( true, $messages );

and then you'll have to go through commandLine.inc InitialiseMessages.inc and delete for example the first some lines in commandLine.inc as it cancels execution if you aren't coming from commandline. Maybe there are further changes needed. For example renaming .htaccess for the time you want to execute your new script. Or you put them in another directory. I guess both isn't fitting into the security concept of mediawiki.

I hope that could be more explicit in the future. (k, maybe noone needs it anymore since 1.9)

Jack


How can I disable the user's prefered language???[edit]

Hello, I want to have my wiki in a certain language, whatever the user's language is. How can I disable this switch? I googled a lot and could not find any solution. Nothing left than manual hacking, I would like to know where this happens in the code. I just need to override the freshly read user's value with the default language again. 86.39.64.9 20:46, 1 May 2008 (UTC)Reply

Error: Call to undefined method MessageCache::singleton()[edit]

The suggested code echo 'MessageCache::singleton()->clear()' | php maintenance/eval.php gives me the error message

Error: Call to undefined method MessageCache::singleton()
Backtrace:
from maintenance/eval.php(85) : eval()'d code(1)
#0 maintenance/eval.php(85): eval()
#1 {main}
on MediaWiki 1.39

Krabina (talk) 07:33, 10 November 2023 (UTC)Reply

I have updated the doc. Please use echo 'MediaWiki\MediaWikiServices::getInstance()->getMessageCache()->clear()' | php maintenance/eval.php – Ammarpad (talk) 08:18, 10 November 2023 (UTC)Reply