JJS
JJS

Reputation: 6658

is it ever appropriate to localize a single ascii character

When would it be appropriate to localize a single ascii character? for instance /, or | ?

is it ever necessary to add these "strings" to the localization effort?

just want to give some people the benefit of the doubt and make sure there's not something I didn't think of.

Upvotes: 0

Views: 290

Answers (3)

Sprachprofi
Sprachprofi

Reputation: 1259

In Greek, questions end with a semicolon rather than ?, so essentially the ? is replaced with ; ... however, you should aim to always translate the question as a complete string including question mark anyway.

Upvotes: 0

Cowirrie
Cowirrie

Reputation: 7226

Yes, there are cases where these individual characters change in localization. This is not a comprehensive list, just examples I happen to know.

  1. Not every locale uses , to separate thousands and . for the decimal. (However, these will usually be handled by your number formatter. If you do so yourself, you're probably doing it wrong. See this MSDN blog post by Michael Kaplan, Number format and currency format are not always the same.)

  2. Not every language uses the same quotation marks (, , and ). See Wikipedia on Non-English Uses of Quotation Marks. (Many of these are only easy to replace if you use full quote marks. If you use the " and ' on your keyboard to mark both the start and end of sentences, you won't know which of two symbols to substitute.)

  3. In Spanish, a question or exclamation is preceded by an inverted ? or !. ¿Question? ¡Exclamation! (Obviously, you can't fix this with a locale substitution for a single character. Any questions or exclamations in your application should be entire strings anyway, unless you're writing some stunningly intelligent natural language generator.)

If you do find a circumstance where you need to localize these symbols, be extra cautious not to accidentally localize a symbol like / used as a file separator, " to denote a string literal or ? for a search wildcard.

However, this has already happened with CSV files. These may be separated by ,, or may be separated by the local list separator. See What would happen if you defined your system's CSV delimiter as being a quotation mark?

Upvotes: 1

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798606

Generally it wouldn't be appropriate to use something like that except as a graphic element (which of course wouldn't be I18N'd in the first place, much less L10N'd). If you are trying to use it to e.g. indicate a ratio then you should have something like "%d / %d" instead, and localize the whole thing.

Upvotes: 2

Related Questions