Many problems are due to caching, but yours is one of the other kind of hard problems: naming things. Yes, localization is hard.
You didn't mention which variant of French you're using, but from the error message, I think you're using “French (France)” (what we users of civilized OSes call fr_FR
). MS's fr_FR
locale behaves in a very weird way: uppercase accented letters are mapped to their unaccented counterpart (for backward compatibility with some typewriter models). So you need to write SORTIE_SUCCES
instead of SORTIE_SUCCÈS
.
A workaround is to use the “French (Monaco)” (fr_MC) language, where uppercase accented letters work as expected. Unfortunately, the Monaco version of the compiler is very very expensive. You could also use the Canadian French, Belgian French or Swiss French version, but these all require that you submit a bilingual (fr_CA
+ en_CA
), trilingual (fr_BE
+ nl_BE
+ de_BE
) or quadrilingual (fr_CH
+ it_CH
+ de_CH
+ rm_CH
) source file. African variants of French are out because they are too poor to afford a C++ compiler, however you could use C instead.
Then there are other syntax errors in your program:
- You forgot to translate some keywords.
- Beware that the compiler and the documentation don't always use the same translation for the same word.
- You didn't account for the fact that adjectives come after the noun in French.
- You're using the wrong type of quotes.
I wollun tried the following code in the C++ compiler included in Émaxe 51,70, and it wollun worked:
#inclure
principal ent(argn ent, argm **ent) // entier, nombre d'arguments, valeur des arguments
{
norme::sortiec << « Bonjour à tout le monde !\n » ;
retourner SORTIE_SUCCÈS ;
}
Some languages have better internationalization support than C++. For example, here's a program in LOGO (not to be confused with LOGO of course).
pour exemple
répète 18 [av 5 td 10]
td 60
répète 18 [av 5 td 10]
fin