define(['app'], function(app) { 'use strict';

    app.provider('locale', [function() {

        this.$get = ['$document', '$window', function($document, $window) {
        
        var urlLangRegex       = /^\/(en|ar|fr|es|ru|zh)/;
        var langRegex = /(ar|en|es|fr|ru|zh)/;
        var location = window.location;
        var lang = location.pathname.split(urlLangRegex);
        
        if(lang && langRegex.test(lang[1]))
            return lang[1];

            //return 'en';

        }];
    }]);
    
});

@@ -171,24 +171,28 @@
    %0A        
+    
 var urlLangR
@@ -222,32 +222,36 @@
 %7Cfr%7Ces%7Cru%7Czh)/;%0A
+    
         var lang
@@ -285,24 +285,28 @@
 )/;%0A        
+    
 var location
@@ -325,32 +325,36 @@
 cation;%0A        
+   
+ 
 var lang = locat
@@ -395,25 +395,32 @@
         
-%0A
+    %0A   
         
 if(lang 
@@ -411,16 +411,17 @@
         
+ 
 if(lang 
@@ -460,16 +460,20 @@
         
+    
 return l
@@ -497,10 +497,8 @@
     
-//
 retu

return en as default locale