And set the IDL2js locale value to the eg_locale for staff web UIs.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
parse_accept_lang($r->headers_in->get('Accept-Language'));
# set the editor default locale for each page load
- $OpenILS::Utils::CStoreEditor::default_locale = parse_eg_locale($ctx->{locale});
+ $ctx->{eg_locale} = parse_eg_locale($ctx->{locale});
+ $OpenILS::Utils::CStoreEditor::default_locale = $ctx->{eg_locale};
+
my $mprefix = $ctx->{media_prefix};
if($mprefix and $mprefix !~ /^http/ and $mprefix !~ /^\//) {
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/skin/[% ctx.skin %].css' />
<link rel='stylesheet' type='text/css' href='[% ctx.media_prefix %]/css/theme/[% ctx.skin %].css' />
- <script language='javascript' src='/IDL2js' type='text/javascript'></script>
+ <script language='javascript' src='/IDL2js?locale=[% ctx.eg_locale %]' type='text/javascript'></script>
<script type="text/javascript">var djConfig = {parseOnLoad:true,isDebug:false};</script>
<script type="text/javascript" src="/js/dojo/dojo/dojo.js"></script>
<script type="text/javascript" src="[% ctx.media_prefix %]/js/dojo/dojo/openils_dojo.js"></script>