Username: Password:

Author Topic: Needs help to make script multi-language  (Read 3197 times)

lunatiqfrinj

  • Newbie
  • *
  • Posts: 38
    • View Profile
Needs help to make script multi-language
« on: June 12, 2008, 10:56:16 am »
Hello all

I need some help, not just with the translation, but detecting what language you speak.

If you can please go to
http://nerdlabs.org/tools/request_headers.php

and post what headers your phone sends when it makes a web request, that would be great.. Also dont forget to say what phone it is, so you dont need to post if someone already announced what your phone sends..

If the goText server admins can actually dig this information out of the logs too, that might be even better (obviously we dont know what phone model is, but we can see how the browsers request languages)


For start:

Symbian OS Series 60v3 nokia sends:
Accept-Language:en;q=1.0,fr;q=0.5,de;q=0.5,es;q=0.5,pt;q=0.5



Other phones might send "en-gb" "en-us" "de-de" etc..
Just looking at all the varieties we get out there to cater for, so if you can give me any assistance with that, and then later with the translating, that would be great! :)

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: Needs help to make script multi-language
« Reply #1 on: June 13, 2008, 08:20:41 am »
Hi lunatiqfrinj,
if you're asking this to enable localization in a goText script you don't have to and shouldn't go this way!
goText starting from version 2.0 sends a "lang=", and it is equal to the midlet language.
Actually you have the following:
"lang=it", "lang=en", "lang=es", "lang=tr", "lang=id".
Take a look at Vyke script for this!


If you need it for other purposes you should know that accept-language in http header is defined in rfc2616 and you shouldn't receive requests different from that defined in the rfc.
Take a look at this page in 14.4: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html , and mainly here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.10

Bye

PS: if you need to translate some strings feel free to ask.