includes/paths.php
changeset 334 c72b545f1304
parent 326 ab66d6d1f1f4
child 343 eefe9ab7fe7c
--- a/includes/paths.php	Fri Dec 21 19:08:27 2007 -0500
+++ b/includes/paths.php	Wed Dec 26 00:37:26 2007 -0500
@@ -418,8 +418,16 @@
   
   function add_page($flags)
   {
+    global $lang;
     $flags['urlname_nons'] = $flags['urlname'];
     $flags['urlname'] = $this->nslist[$flags['namespace']] . $flags['urlname']; // Applies the User:/File:/etc prefixes to the URL names
+    
+    if ( is_object($lang) )
+    {
+      if ( preg_match('/^[a-z0-9]+_[a-z0-9_]+$/', $flags['name']) )
+        $flags['name'] = $lang->get($flags['name']);
+    }
+    
     $pages_len = sizeof($this->pages)/2;
     $this->pages[$pages_len] = $flags;
     $this->pages[$flags['urlname']] =& $this->pages[$pages_len];