mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
@@ -6,11 +6,13 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "npm install rimraf && rimraf dist node_modules typings",
|
"clean": "npm install rimraf && rimraf dist node_modules typings",
|
||||||
"build": "npm run tslint && npm run tsc && npm run licensecheck",
|
"build": "npm run tslint && npm run tsc && npm run licensecheck",
|
||||||
"start": "npm run build && concurrently \"npm run tsc:w\" \"npm run serve\" ",
|
"start": "npm run build && npm run serve",
|
||||||
|
"start:dev": "npm run build && concurrently \"npm run tsc:w\" \"npm run serve:dev\" ",
|
||||||
"aws": "node app.js",
|
"aws": "node app.js",
|
||||||
"tsc": "tsc",
|
"tsc": "tsc",
|
||||||
"tsc:w": "tsc -w",
|
"tsc:w": "tsc -w",
|
||||||
"serve": "wsrv -O http://localhost:3000 -s -l -p 3000 -a 0.0.0.0 -x ./server/versions.js",
|
"serve": "wsrv -O http://localhost:3000 -s -p 3000 -a 0.0.0.0 -x ./server/versions.js",
|
||||||
|
"serve:dev": "wsrv -O http://localhost:3000 -s -l -p 3000 -a 0.0.0.0 -x ./server/versions.js",
|
||||||
"tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json 'app/{,**/}**.ts'",
|
"tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json 'app/{,**/}**.ts'",
|
||||||
"licensecheck": "license-check"
|
"licensecheck": "license-check"
|
||||||
},
|
},
|
||||||
|
@@ -25,8 +25,7 @@ export class AlfrescoTranslationService {
|
|||||||
userLang: string = 'en' ;
|
userLang: string = 'en' ;
|
||||||
|
|
||||||
constructor(private translate: TranslateService) {
|
constructor(private translate: TranslateService) {
|
||||||
this.userLang = navigator.language.split('-')[0]; // use navigator lang if available
|
this.userLang = translate.getBrowserLang() || 'en';
|
||||||
this.userLang = /(fr|en)/gi.test(this.userLang) ? this.userLang : 'en';
|
|
||||||
translate.setDefaultLang(this.userLang);
|
translate.setDefaultLang(this.userLang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user