+% unless ( $page_agent ) {
+%
+% if ( $cgi->param('showagent') ) {
+% $cgi->param('showagent', 0);
+ ( <a href="<% $cgi->self_url %>">show global configuration</a> )
+% $cgi->param('showagent', 1);
+% } else {
+% $cgi->param('showagent', 1);
+ ( <a href="<% $cgi->self_url %>">show agent overrides</a> )
+% $cgi->param('showagent', 0);
+% }
+%
+% }
+% if ( @locales ) {
+(
+% if ( $locale ) {
+% $cgi->delete('locale');
+ <a href="<%$cgi->self_url%>">global settings</a> |
+% }
+<script type='text/javascript'>
+function changeLocale(what) {
+ //var what = document.getElementById('select-locale');
+ if(what.selectedIndex > 0) {
+ what.form.submit();
+ }
+}
+</script>
+invoice language options:
+<form action="<% $cgi->self_url %>" method="GET" style="display:inline;">
+<& /elements/select.html,
+ 'field' => 'locale',
+ 'options' => [ '', grep { $_ ne 'en_US'} @locales ],
+ 'labels' => { map {
+ my %info = FS::Locales->locale_info($_);
+ $_ => "$info{name} ($info{country})"
+ } grep { $_ ne 'en_US' } @locales },
+ 'curr_value' => $locale,
+ 'id' => 'select-locale',
+ 'onchange' => 'changeLocale'
+ &>
+ )
+% $cgi->param('locale', $locale);
+% }
+</form>
+
+<BR><BR>
+