Permalink
Browse files

added basic language support

  • Loading branch information...
1 parent 78cd456 commit 61a9cb836b316e36acf98e5cfc6d8e1fa8d3741a @mobz committed Jun 21, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 index.html
View
@@ -10,6 +10,19 @@
<script src="lib/jsacx/src/jsacx.js"></script>
<script src="lib/nohtml/jquery.acx-nohtml.js"></script>
<script src="lib/lang/en_strings.js"></script>
+ <script>
+ (function() {
+ var script0 = document.getElementsByTagName('script')[0];
+ var userLang = window.navigator.language || window.navigator.userLanguage;
+ userLang && ['fr'].forEach( function( lang ) {
+ if( userLang.indexOf( lang ) === 0 ) {
+ var s = document.createElement("script");
+ s.src = 'lib/lang/' + lang + '_strings.js';
+ script0.parentNode.insertBefore(s, script0);
+ }
+ });
+ }());
+ </script>
<script src="lib/jsacx/src/jsacx-widgets.js"></script>
<script src="lib/jsacx/src/jsacx-fields.js"></script>
<script src="lib/jsacx/src/jsacx-data.js"></script>

0 comments on commit 61a9cb8

Please sign in to comment.