224 posts
Posted 15 May 2015 - 11:59 PM
Introducing, the location API! Simply use to get the User's location (City, State, Country)Documentation:
Spoiler
locationAPI.getState() –Returns state/region, if there is no specific state/region, it will return Error.noRegion (usually, but not always accurate)
locationAPI.getCity() –Returns city, this is commonly inaccurate, (especially if you are in a rural area)
locationAPI.getCountry() –Returns Country, this should always be accuratePastebin:
Spoiler
pastebin get t5D6erau locationAPIWork flow:
Spoiler
Computercraft -> CreeperTech.net -> ip-api.com/php/[ip]Note:
Thanks to ip-api.com for the php service!
Edited on 15 May 2015 - 10:00 PM
2679 posts
Location
You will never find me, muhahahahahaha
Posted 16 May 2015 - 12:17 AM
This is quite clever. It can be used to determine the language an OS should be in, for example.
673 posts
Posted 16 May 2015 - 12:54 AM
This is quite clever. It can be used to determine the language an OS should be in, for example.
location =/= language
224 posts
Posted 16 May 2015 - 01:00 AM
Thanks, other examples might include weather.. etc, also, i will add more functions par request :)/>
224 posts
Posted 16 May 2015 - 01:05 AM
2679 posts
Location
You will never find me, muhahahahahaha
Posted 16 May 2015 - 01:23 AM
Well, technically it is not the same, but let's say there is a certain correlation. It's better than setting it to english automatically. If you can translate it
224 posts
Posted 16 May 2015 - 05:13 AM
You know what this would really be good for? Automatically telling the time
2679 posts
Location
You will never find me, muhahahahahaha
Posted 16 May 2015 - 07:51 AM
Yes, it would.
673 posts
Posted 16 May 2015 - 02:38 PM
Well, technically it is not the same, but let's say there is a certain correlation. It's better than setting it to english automatically. If you can translate it
some countries have more than one language, for example in Belgium they speak French, Dutch, and German.
If you use this method to determine language, how do you know which one to use for people in Belgium?
It seems like the best way is to ask for language on setup.
Edited on 16 May 2015 - 12:57 PM
224 posts
Posted 16 May 2015 - 05:30 PM
maybey a prompt to ask if thats thier correct language?
673 posts
Posted 02 June 2015 - 10:52 PM
maybey a prompt to ask if thats thier correct language?
Well, in that case you'd have to display it in that language, and if they don't understand it it'd be totally worthless. Plus, how would you interpret the language if they're in a country with multiple languages?
Edited on 02 June 2015 - 08:53 PM