// The following line tells the locale extractor what to
// look for.
// <locale-token project="my_project">LOCALE</locale-token>
// The localization macro.
#define LOCALE(X,Y) Locale.translate("my_project", \
get_lang(), X, Y)
string get_lang() { return random(2)?"eng":"swe"; }
int(0..0) main() {
write(LOCALE(0, "This is a line.")+"\n");
write(LOCALE(0, "This is another one.\n");
return 0;
}