If you haven't read lesson 1 on string identifiers for web applications translations, then I strongly recommend you do so first. When you start translating a web application, one question will always pop to mind fast enough: do I include punctuation inside the translation or not?
Not all languages end sentences with dotsWell the first element of answer here is that not all languages end up their sentences with dots. This might seem pretty weird to most west Europeans or North Americans, but Japanese is a great example here: they split sentences with 。, not just a dot. Their question mark is also a bit different: it uses カ (ka) instead of "?". From there, saying that punctuation should be included inside the translatable string just pops to mind as the natural behaviour. This way, each translator can manage punctuation in the way their language dictates. As an example, the sentence
Welcome to this website. Are you ready?would transform into its translated form
ようこそこのサイトへ。準備できてるカAs you can see, translating the initial sentences by not considering the punctuation marks would obvioulsy have generated duplication and confusion. Something like:
ようこそこのサイトへ。. 準備できてるカ?And there is another case where this might be useful...
Right to left languages end sentences with dots, but on the other sideMost European, American and even Asian languages are written from left to right. That's how I'm writing right now. Some languages, though, most importantly a big set of arabic languages, are written from right to left. Now imagine you would not include the dot in the following sentence to be translated.
Welcome to our website.The translation of this would be
مرحبا بكم في هذا الموقع..Now the problem here is, because this sentence is written from right to left, the dot is not ending the sentence anymore. It's starting it! As you can see, at least two reasons exist to always include punctuation in your translatable sentences.
[...] out lesson 2 on including punctuation inside web applications translations here Categories: Development, Development projects, Documentation, English, php Tags: php, [...]