Telize

유료
분류별 Frederic Cambus | 업데이트됨 22日前 | Location
인기

9.8 / 10

지연 시간

83ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

Latitude / longtitude are returned in different format depending on locale

Rapid account: Canfiax
canfiax
8年前

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)

Rapid account: Fcambus
fcambus Commented 8年前

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.

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입