geoLocator
geoLocator
geoLocator
returns locale info based on user IP
Metadata
Instantiating |
findCountry()
returns country from user IP
Arguments
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
thisIP | string | Yes | |||
fallbackCountry | string | No | US |
findLanguage()
returns language from user IP/http_accept_Language
Arguments
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
thisIP | string | Yes | |||
thisLanguage | string | Yes | |||
fallbackLanguage | string | No | en |
findLocale()
returns locale from user IP
Arguments
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
thisIP | string | Yes | |||
thisLanguage | string | Yes | |||
fallbackLocale | string | No | en_US |
init()
initializes valid locales
Arguments
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
None |
isValidLocale()
determines if passed locale is valid java locale
Arguments
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
aLocale | string | Yes |
showCountry()
returns full country, localized if available, from user IP
Arguments
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
thisIP | string | Yes |
showLanguage()
returns full language, localized if available, from user IP
Arguments
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
thisIP | string | Yes |