I've been meaning for some time to write an article about this for the W3C i18n 
site but not yet found the time.  I'll have to try harder.

To help, here are some brief suggestions, based on the assumptions that you are 
linking to translations (rather than different country sites), and have enough 
space on the user interface to list all alternatives.  

(Disclaimer: These are quickly written stream-of-consciousness notes that 
haven't been reviewed.)

-       use utf-8 as the page encoding if you can (you do Lachlan, I know)

-       use the name of the target language in the native language and script 
as the link, eg. 'French' would be written 'franÃais' (note, beware of 
different capitalisation conventions)

-       use a graphic if you are concerned about users not having the 
appropriate font/rendering capability for the language you are showing (note 
that these will never be translated, so the usual translatability issue about 
text in graphics is mute) (note also that the person who speaks the language 
linked to will usually have the necessary fonts etc., so this is more of a 
cosmetic issue)(Of course, it is slightly more time consuming to change 
graphics if your styling is changed.)

-       if you are not using utf-8 or another Unicode encoding you may need to 
use a graphic or numeric character references

-       put the links near the top of the page (and ideally to the right side, 
if the design allows).  At least make them above the fold.

-       don't forget to post visible links to all language versions on all 
pages that have translations

-       since you are using text in another language, identify the language 
using lang/xml:lang attributes

-       add title and alt text *in the language of the current page* that 
explains that this is a link to a translated version of the page. It is likely 
that the language name alone is sufficient here (see the example below) - this 
certainly helps when adding new  translations to the list, since you can look 
up the appropriate text rather than having to ask all the translators for 
additional translations of language names).

-       note that lang/xml:lang values reflect the language of attribute text 
as well as element content. For this reason you may need to nest elements as in 
the example below.

-       consider specifying styling for the foreign text - especially if this 
is Chinese, Japanese or Korean, where fonts may be automatically applied by the 
user agent (see http://www.w3.org/International/tests/results/lang-and-cjk-font 
). For info on how to apply the style see 
http://www.w3.org/International/questions/qa-css-lang .



EXAMPLE

Here is an example of an English document that points to romanian and swedish 
translations using text:

<p class="noprint">&gt; 
        <span title="Romanian"><a 
href="/International/articles/serving-xhtml/Overview.ro.html" xml:lang="ro" 
lang="ro">RomÃnÄ</a></span>&nbsp; 
        <span title="Swedish"><a 
href="/International/articles/serving-xhtml/Overview.sv.html" xml:lang="sv" 
lang="sv">svenska</a></span></p>

[Those of you who are clever enough to find these pages should be aware that we 
are still in the process of implementing these translations and updating the 
page style at the same time, so you won't see what you expect in this case ;-)

Note that the span is added to support the title information, since that is in 
English. (The <html> tag declares the context to be English.)


Here is an example using graphics:

<p class="noprint">&gt; 
        <a href="/International/articles/serving-xhtml/Overview.ro.html"><img 
src="romanian.gif" alt="Romanian" title="Romanian"/></a>&nbsp; 
        <a href="/International/articles/serving-xhtml/Overview.sv.html"><img 
src="swedish.gif" alt="Swedish" title="Swedish"/></a></p>



SHOULD I USE HREFLANG?

You could, but it doesn't really seem to have any effect here (unlike in the 
<link> element).  There are also some potential issues you should consider. See 
http://www.w3.org/International/geo/html-tech/tech-lang.html#ri20050128.152033553

Also, it should be redundant because you should ensure that you declare the 
language of the target page in its <html> tag anyway !



OTHER IDEAS (SOME FROM WSG FOLK)

-       if using graphics, you could use a roll-over mechanism to reveal the 
name of the language of the target page in the language of the current page 
(rather than just the title and alt attributes).

-       I'm not convinced an automated gif is a good idea - especially if you 
have several going at the same time (too much like blink text).

-       It is also possible to include the name of the language of the target 
page in parentheses in the language of the current page - an example makes this 
clear, on an English page you might have: franÃais (French).  This uses up a 
lot of space, however, and it could be argued that it is unnecessary.


FURTHER READING

See also upcoming articles on:
-       How to use the link element
-       How to deal with pull-downs, where there isn't room to list all 
alternatives directly in the page.


Hope that helps.
RI


============
Richard Ishida
W3C

contact info:
http://www.w3.org/People/Ishida/ 

W3C Internationalization:
http://www.w3.org/International/ 

Publication blog:
http://people.w3.org/rishida/blog/
 


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Lachlan Hardy
> Sent: 11 April 2005 15:02
> To: [email protected]
> Subject: [WSG] I18n - Traditional & Simplified Chinese in an 
> English web site
> 
> G'day folks!
> 
> A query for those with some experience in using multiple 
> languages in their sites:
> 
> In a site that is predominantly English, select pages have 
> been translated into both Simplified and Traditional Chinese. 
> Each page contains a link where users are able to indicate 
> their preferred language (hence receiving translated pages as 
> appropriate). My issue is how to show this this link appropriately
> 
> Originally I had something similar to this:
> 
> <a href="#" lang="zh-Hans" 
> title="éæåïåæéééåçèæéèïäåæ
> åèééæäçääææç">çääæ</a> (don't know this will 
> come out in 
> email, but the contents of the anchor and its title attribute 
> are Simplified Chinese)
> 
> However, this fails as on many computers it will appear as 
> those horrible little blocks that indicate lack of the 
> appropriate font
> 
> Next attempt was something like:
> 
> <a href="#"><img
> src="#"
> alt="Most pages will display in English, only translated 
> pages display in Simplified Chinese. éæ
> åïåæéééåçèæéèïäåæåèééæäçääææç"
>  title="When selected, most 
> pages will be in readable in English with only translated 
> pages displaying in Simplified Chinese. éæ
> åïåæéééåçèæéèïäåæåèééæäçääææç"></a>
> 
> Except of course, that doesn't give any indication of 
> language involved.
> 
> Suggestions, experiences, vague clues?
> 
> Cheers,
> Lachlan
> 
> 
> ******************************************************
> The discussion list for  http://webstandardsgroup.org/
> 
>  See http://webstandardsgroup.org/mail/guidelines.cfm
>  for some hints on posting to the list & getting help
> ******************************************************
> 

******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to