SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Guru Rob_D's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Switching spelling convention according to location of visitor

    A website for a cross-cultural company needs to display either American- or International-English spelling according to the location of the visitor.

    Is it possible to identify the geo-location of a visitor and have PHP parse the code to show "internationalization" for American visitors and "internationalisation" for the rest of the world? Assume the database (MySQL) is in International-English.

    If so, will this impact significantly on speed?

  2. #2
    SitePoint Guru Rob_D's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To clarify.

    Correct me if I am wrong, I understand the geo-location of visitors can be determined by the browser.

    When it is established that the visitor is American, can PHP search and replace International spelling convention with American on the fly for the output?

    Or is there a better solution?

  3. #3
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    geo-location is done by IP and I don't think its that big of a deal if you use International-English even for American visitors, endless a word has drastically different meaning.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  4. #4
    SitePoint Guru Rob_D's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    geo-location is done by IP and I don't think its that big of a deal if you use International-English even for American visitors, endless a word has drastically different meaning.
    Fair enough. However, this is what the client is asking for and they are specialists in cross-cultural communication.

    Can you point me towards the method for getting the geo-location by IP?

  5. #5
    SitePoint Addict
    Join Date
    Nov 2006
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are litterally tons of threads on sitepoint discussing this IP location thing, lots of them are interesting, since I know nothing in the matter I can only attempt to link you to the ones i can find, I just wish I could find one I saw the other day, that one was really good, it had a bunch of links for geo locators

    http://www.sitepoint.com/forums/show...ht=ip+location

  6. #6
    SitePoint Guru Rob_D's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I think I will go by the language setting by browser as the simplest, cheapest method.
    It has yet to be proven that intelligence has any survival value.
    Arthur C. Clarke

  7. #7
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Just so you know either method is not completely reliable esp the browsers language settings.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  8. #8
    SitePoint Guru Rob_D's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    Just so you know either method is not completely reliable esp the browsers language settings.
    Yes, I realise that. Personally I don't think it's critical. I will ask you guys to test!
    It has yet to be proven that intelligence has any survival value.
    Arthur C. Clarke

  9. #9
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In Firefox you can enter about:config in the address bar to change the browser configuration. You can probably change the language settings there if you want to test your detection.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •