EOSTracker icon indicating copy to clipboard operation
EOSTracker copied to clipboard

Detect country of visitor and load default language

Open kesar opened this issue 6 years ago • 2 comments

Detect country of visitor and load default language if exists in the list.

kesar avatar Jun 21 '18 10:06 kesar

If we need to do IP detection, we probably need an API endpoint with IP to location capability, maybe there are some free 3rd party API available to do this.

However, I feel like using client browser preferred language is probably good enough in our case. We currently doing that in app.components, maybe just need to switch to use TranslateService.getBrowserLang, https://github.com/ngx-translate/core/blob/master/projects/ngx-translate/core/src/lib/translate.service.ts#L487.

tianyangj avatar Aug 03 '18 07:08 tianyangj

good point 👍 we can use browser

kesar avatar Aug 03 '18 08:08 kesar