Receive SMS Online

FREEMIUM
Door Sonj | Bijgewerkt un mese fa | Other
Populariteit

8.1 / 10

Latency

3,613ms

Serviceniveau

92%

Terug naar alle discussies

Latitude / longtitude are returned in different format depending on locale

C
canfiax
6 anni fa

After adding multilangual support for my Laravel 5 application, depending on the locale the user is currently at, the latitude and longtitude are returned differently. How can I force the locale to be “en” always?

English locale response:

array:9 [?
  "city" => "Copenhagen"
  "country" => "Denmark"
  "countryCode" => "DK"
  "latitude" => 55.6759,0
  "longitude" => 12.5655,0
  "region" => "Hovedstaden"
  "regionCode" => "17"
  "timezone" => "Europe/Copenhagen"
  "postalCode" => "2300"
]

Danish locale response:

array:9 [
  "city" => "Copenhagen"
  "country" => "Denmark"
  "countryCode" => "DK"
  "latitude" => 55,6759
  "longitude" => 12,5655
  "region" => "Hovedstaden"
  "regionCode" => "17"
  "timezone" => "Europe/Copenhagen"
  "postalCode" => "2300"
]	

(notice the latitude & longtitude comma/point difference)

avatar
fcambus commented 6 anni fa

Hello,

Telize is locale agnostic, it always send the same format (with dot) over the wire. Which means that the conversion happens within your application.

I don’t know Laravel so I can’t offer any assistance on this matter, sorry.

Best regards.

Doe mee aan de discussie - voeg hieronder een opmerking toe

Log in / Schrij u in om nieuwe opmerkingen te plaatsen
Beoordeling: 5 - Stemmen: 1