Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

200
Views
Cómo obtener el idioma actual con ngx-translate en angular2

Quiero obtener el idioma actual con this.translate.getBrowserLang() , pero siempre devuelve 'en', cualquiera que sea el idioma actual y cuáles son los idiomas admitidos.

Aquí está el plnkr: https://plnkr.co/edit/JEXgj8WcISYGtDg75VoR?p=preview ,


tal vez plnkr se haya roto, puedes probar stackblitz: https://stackblitz.com/edit/github-kk1mud-a7gxbb

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

importar el servicio de traducción y agregar el constructor

 constructor(private translate: TranslateService){ }

Encuentro que usa this.translate.currentLang para obtener el idioma actual

about 4 years ago · Santiago Trujillo Report

0

constructor(private translate: TranslateService){} ngOnInit() { this.translate.currentLang; }
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!