vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r19577: LJSUP-8549: Incorrect languege in RTE ed...

Committer: vsukhanov
LJSUP-8549: Incorrect languege in RTE editor
U   trunk/cgi-bin/weblib.pl
Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl	2011-08-03 06:08:13 UTC (rev 19576)
+++ trunk/cgi-bin/weblib.pl	2011-08-03 06:16:47 UTC (rev 19577)
@@ -1393,6 +1393,9 @@
             %journal_info = $journalu->info_for_js;
         }
 
+        my $current_lang = eval { Apache::BML::get_language(); } || ($LJ::DEFAULT_LANG || $LJ::LANGS[0]);
+           $current_lang =~ s/^([^_]+)_.*/$1/; # en_LJ -> en
+
         my $journal_info_json = LJ::JSON->to_json(\%journal_info);
         my $jsml_out = LJ::JSON->to_json(\%LJ::JSML);
         $ret .= qq {
@@ -1404,6 +1407,7 @@
                     for (i in p) Site[i] = p[i];
                 })();
                 Site.current_journal = $journal_info_json;
+                Site.current_lang    = '$current_lang';
            </script>
         };
 

Tags: livejournal, pl, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments