Chapter 11. Libraries and Components
88
A
gettext
ed message must not used in multiple contexts. This is because a word may have
different meaning in different context. For example, a verb means an order or a command if it ap 
pears at the top of the sentence in English. However, different languages have different grammar.
If a verb is
gettext
ed and it is used both in a usual sentence and in an imperative sentence, one
cannot translate it.
If a sentence is
gettext
ed, never divide the sentence. If a sentence is divided in the original
source code, connect them so as to single string contains the full sentence. This is because the
order of words in a sentence is different among languages. For example, a routine
printf("There ");
switch(num_of_files) {
case 0:
printf("are no files ");
break;
case 1:
printf("is 1 file ");
break;
default:
printf("are %d files ", num_of_files);
break;
}
printf("in %s directory.\n", dir_name);
has to be written like that:
switch(num_of_files) {
case 0:
printf("There are no files in %s directory", dir_name);
break;
case 1:
printf("There is 1 file in %s directory", dir_name);
break;
default:
printf("There are %d files in %s directory", num_of_files, dir_name);
break;
}
before it is
gettext
ized.
A software with
gettext
ed messages should not depend on the length of the messages. The
messages may get longer in different language.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

indiana web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved