HTMLv: request pages in native language (only english and russian for now)

git-svn-id: svn://kolibrios.org@4571 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2014-02-10 18:36:47 +00:00
parent 81e6529629
commit 164d94cfb7

View File

@ -35,12 +35,14 @@
?define T_LAST_SLIDE "<EFBFBD>â® ¯®á«¥¤­¨© á« ©¤" ?define T_LAST_SLIDE "<EFBFBD>â® ¯®á«¥¤­¨© á« ©¤"
char loading[] = "‡ £à㧪  áâà ­¨æë...<br>"; char loading[] = "‡ £à㧪  áâà ­¨æë...<br>";
unsigned char page_not_found[] = FROM "html\page_not_found_ru.htm"; unsigned char page_not_found[] = FROM "html\page_not_found_ru.htm";
char accept_language[]= "Accept-Language: ru\n\0";
#else #else
char version[]=" Text-based Browser 0.99.67"; char version[]=" Text-based Browser 0.99.67";
?define IMAGES_CACHE_CLEARED "Images cache cleared" ?define IMAGES_CACHE_CLEARED "Images cache cleared"
?define T_LAST_SLIDE "This slide is the last" ?define T_LAST_SLIDE "This slide is the last"
char loading[] = "Loading...<br>"; char loading[] = "Loading...<br>";
unsigned char page_not_found[] = FROM "html\page_not_found_en.htm"; unsigned char page_not_found[] = FROM "html\page_not_found_en.htm";
char accept_language[]= "Accept-Language: en\n\0";
#endif #endif
byte native_http=1; byte native_http=1;
@ -370,7 +372,7 @@ void Scan(int id)
return; return;
case HOME: case HOME:
strcpy(#editURL, "http://kolibrios.org/en/index.htm"); strcpy(#editURL, "http://kolibrios.org/");
case GOTOURL: case GOTOURL:
case 0x0D: //enter case 0x0D: //enter
if ((strstr(#editURL,"ttp://")==0) && (editURL[0]!='/')) strcpy(#URL,"http://"); else URL[0] = 0; if ((strstr(#editURL,"ttp://")==0) && (editURL[0]!='/')) strcpy(#URL,"http://"); else URL[0] = 0;
@ -492,7 +494,7 @@ void OpenPage()
{ {
if (native_http) if (native_http)
{ {
http_get stdcall (#URL, 0); http_get stdcall (#URL, #accept_language);
http_transfer = EAX; http_transfer = EAX;
IF (http_transfer < 0) notify("Error from HTTP lib"); IF (http_transfer < 0) notify("Error from HTTP lib");
} }