EOSTracker
EOSTracker copied to clipboard
Detect country of visitor and load default language
Detect country of visitor and load default language if exists in the list.
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.
good point 👍 we can use browser