ErrorPro / react-google-autocomplete

React components for google places API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Language setting is english but returns a different language

illlama opened this issue · comments

Just like a bellow, search results aren't an English.

I tried to change language as korean or english or the others but the result is almost same ( I mean, US is change as I intended but del Norte part wasn't changed.)

image

And here's my code.

<StyledAutoComplete
                apiKey={process.env.GOOGLE_MAPS_API_KEY}
                onPlaceSelected={(place) =>...}
                options={{
                    types: ['administrative_area_level_1'],
                    componentRestrictions: { country: 'us' },
                }}
                language={'en'}
            />

I can't find a way to solve this problem I searched so I made an issue.

Thanks for this great library

The Google API uses the browser's preferred language setting when displaying textual information.
Screenshot 2022-12-09 at 21 26 52
Screenshot 2022-12-09 at 21 27 36
Screenshot 2022-12-09 at 21 29 20