Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

Birdseye

Schüler

  • »Birdseye« ist der Autor dieses Themas

Beiträge: 125

Wohnort: De Haan

Beruf: Freelance Photographer

  • Nachricht senden

1

Montag, 30. April 2018, 05:55

Detecting country code

Is it possible in Krpano to do a browser-level country ánd language check,
and display the tour in the language accordingly?


Yvan.

VRW_Phil

Schüler

Beiträge: 73

Wohnort: London

Beruf: Krpano Custom Coding. Responsive Websites.

  • Nachricht senden

2

Montag, 30. April 2018, 09:47

Hi Yvan

I'm not sure about Krpano detecting country but I used a Json call and then passed the results to Krpano environment. Which worked well for my self as I only needed to test for two languages..

I used https://ipdata.co/ you can also make specific calls by passing IP address to it.
Example Twitter : https://api.ipdata.co/199.59.149.165
I'm sure there are many other APIs out there.

Anyway hope that Is some help, or at least a possible option.

Birdseye

Schüler

  • »Birdseye« ist der Autor dieses Themas

Beiträge: 125

Wohnort: De Haan

Beruf: Freelance Photographer

  • Nachricht senden

3

Montag, 30. April 2018, 17:14

Thank you for your reply. We will check this.

Grts,
Yvan

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

4

Montag, 30. April 2018, 17:53

ipdata.co shows the server address but not necessarily the user's country.

I think it's best to check the browser language.


Quellcode

1
2
3
4
  <action name="getlanguagebrowser" type="Javascript"><![CDATA[
    var language = window.navigator.userLanguage || window.navigator.language;
    actions.trace('a new language: '+language);
  ]]></action>



PIotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

Birdseye

Schüler

  • »Birdseye« ist der Autor dieses Themas

Beiträge: 125

Wohnort: De Haan

Beruf: Freelance Photographer

  • Nachricht senden

5

Dienstag, 1. Mai 2018, 06:02

This is an interesting approach too, thank you PIotr.

But we need the country code because the purpose is to direct the visitor to a website in his own country.
F.ex. Here in Belgium we speak 2 languages (3 in fact ;). If the browser detects dutch, the visitor can be directed to Holland or Belgium, If he speaks french, he can be directed to Belgium or France. Therefore the country code is important for us.
Another option is to let the visitor choose his own country at the start of the Vtour. But automating this would be great.

Grts,
Yvan

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

6

Dienstag, 1. Mai 2018, 12:35

I understand. I'm just writing that ipdata.co will not solve your problems.

The country where the server is located does not have to match the location of the user. I have my own servers in a different country than I live.

ipdata.co would falsify my location due to the location of the server.
I would use JS because for me it is more important what language the user uses, not what country he lives in.


You can use both methods.


Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

jordi

Profi

Beiträge: 583

Wohnort: Barcelona

Beruf: creating ideas & coding them

  • Nachricht senden

7

Dienstag, 1. Mai 2018, 21:15

Multilingual troubles !! Hard at the begining, making you evolve easily ;)
everpano.com step beyond 360