define(["require","Ti/_/lang","Ti/_/Evented","Ti/API"],function(e,t,n,r){function o(e,t){return c[e]||t||e||""}var i=t.val(navigator.language,navigator.browserLanguage).replace(/^([^\-\_]+)[\-\_](.+)?$/,function(e,t,n){return t.toLowerCase()+(n&&"-"+n.toUpperCase())}),u=i.split("-"),a=u[0],c={},g=e.config,m=g.app;document.body.dir=/^ar|he$/.test(a)?"RTL":"LTR",document.title=m.name=m.names[a]||m.name;try{~g.locales.indexOf(a)&&(c=e("./Locale/"+a+"/i18n"))}catch(f){}return Object.defineProperty(window,"L",{value:o,enumarable:!0}),String.formatDate=function(e){return r.debug('Method "String.formatDate" is not implemented yet.'),e.toString()},String.formatTime=function(e){return r.debug('Method "String.formatTime" is not implemented yet.'),e.toString()},String.formatCurrency=function(e){return r.debug('Method "String.formatCurrency" is not implemented yet.'),e},String.formatDecimal=function(e){return r.debug('Method "String.formatDecimal" is not implemented yet.'),e},t.setObject("Ti.Locale",n,{constants:{currentCountry:u[1]||"",currentLanguage:u[0]||"",currentLocale:i},formatTelephoneNumber:function(e){return e},getCurrencyCode:function(){return""},getCurrencySymbol:function(){return""},getLocaleCurrencySymbol:function(){return""},getString:o,_getString:function(e,n){return t.val(n,o(e,n))}})});