Access keys and multi languages
Posted: Mon Feb 19, 2007 1:32 am
This is sort of a two part question:
Browsers that support access keys do so via the accesskey attribute which takes a single character - how and does this even work when using languages which require 2byte character encoding?
If I was given a string which was in say chinese, and I translated English text into chinese, it might look somehting like:
I know this is likely way off, but I'm trying to understand how I might translate a text from english to another language. Anyways, assuming I had a string like above stored in variable $caption if I wanted to underline the second character (to indicate the access key) I don't suppose I could even use substr but I would have to pass that string to the PHP multi byte string functions correct? Or set the locale to whatever the language is in, which would tell PHP to handle the string differently.
Using default string functions the above string is actually 22 bytes, but does it get interpreted as 4 * 2 = 8 bytes or four visible characters on screen???
Did I make any sense? Ca someone (AC?) clear this up for me?
Browsers that support access keys do so via the accesskey attribute which takes a single character - how and does this even work when using languages which require 2byte character encoding?
If I was given a string which was in say chinese, and I translated English text into chinese, it might look somehting like:
Code: Select all
$caption = "&7464;&5235;&847;&6334;"; // And so on??Using default string functions the above string is actually 22 bytes, but does it get interpreted as 4 * 2 = 8 bytes or four visible characters on screen???
Did I make any sense? Ca someone (AC?) clear this up for me?