slide 16
Copyright © 2005 W3C (MIT, ERCIM, Keio)
Handling variables
Linguistic issues
printf(
"There were $errors validation errors in the file $filename ." )
printf(
"Die Datei $filename enthält $errors Gültigkeitsfehler."
)
Die Datei myFirst.html enthält 268 Gültigkeitsfehler.
Go to previous slide Go to next slide Go to the first slide Go to the slide index Go to the PDF version
Slide 16 of 76
By embedding the variable names directly in the printf string, as shown in this slide, we finally achieve the desired result in German.
Nota bene: Successful, or at the very least, cost effective localization in this case is down to the designer/developer understanding the potential pitfalls of various approaches to coding. It is not the job of the localization vendor to get this right. It needs to be done as the initial content is created!
You should also be very careful of the assumption that 'This doesn't affect me, since we don't translate the content I develop.' I have seen many, many cases where the thing being developed was later so successful that people wanted to take it to other regions, only to find that they ran into major difficulties because of issues with the translatability of the code or content. It's best to just do it right from the start.
"