Archive

Archive for the ‘Web’ Category

Reactions as Another Aspect of Social Media

June 16th, 2012 joconner No comments

One of the new trends in making web content more social is the recording of reader impressions or reactions. For example, I just read an article about Father’s Day and the article included a poll that allowed me to quickly provide my response or impression of the content. The poll wasn’t a questionnaire that I’d never take the time to fill out. Instead, it was just a few buttons or image maps that require a single click:

Article impression

What’s interesting about this is that not only do I get to enjoy the article content, but I also get an indication of how others perceive or respond to the content — obviously making the content more social. What a great idea! 

Another interesting part of this to me is the choice to keep the response anonymous and aggregated. The above image, for example, shows the categories of reader response but doesn’t tell me exactly who responded in any of the categories. Certainly it would be possible, especially if this were tied to Facebook or Google Plus, to see what my friends or colleagues think about the content too.

I wonder whether the anonymity preference is specific to US English readers. As I think about it, I’m happy to participate in the poll, but I might not want to make my specific opinion public knowledge. I wonder if other cultures would feel differently in general? What groups of people would feel more open to expressing opinions publicly and associating their real or online identities to their response?

Oh, my response to this particular article was “THINK”…but not about the article content. Instead, the article and the poll made me think about changes in social media. Every time I think we’ve tapped our creative juices out, somebody thinks of something new and impressive to make the online world more social. 

VN:F [1.9.22_1171]
Rating: 1.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: -1 (from 1 vote)
Categories: Web Tags: , ,

Just another suggestion for language selection lists

June 1st, 2012 joconner No comments

Recently I was asked to fill in an online questionnaire. As I began the form, an entire window was shown to me, and it had a single UI item on it, a language selection list. Of course, I had to click on the list, wondering what wonderful choices I might have for a user interface. Surprisingly, the list revealed a single entry: English.

PerplexingSingleLanguageChoice


If you sometimes read my blog, you’ll know that I’m particularly interested in language lists at the moment. However, if you are interested in providing a list, I do have one additional suggestion…if you don’t have any choices, you probably shouldn’t use a selection list. It’s just too much of a bummer when nothing else is available and just doesn’t make much sense. Maybe disable it until your UI does provide additional languages.

That’s it for today. 

VN:F [1.9.22_1171]
Rating: 1.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 3 votes)
Categories: Globalization, Web Tags:

Language Signals on the Web

February 8th, 2012 joconner No comments

Languages

Presenting a user interface in the customer’s language should be a high priority from your product management team. If not, they’re not doing their job in my opinion. Assuming you have the feature in your product roadmap, how do you choose the UI language of your customer on the web. After all, web applications have multiple, sometimes conflicting language signals.

A language signal is an indicator that gives your application a hint of your customer’s preferred language. In a web application, these signals are numerous. To help you in choosing from all these signals, I believe you should honor the preferences in the following priority. That is, check each signal for its existence in this order, and use the first signal that is available:

  1. query parameters, for example http://example.com?lang=fr
  2. domain name or path parameters, i.e. http://fr.example.com or http://example.com/fr
  3. persistent application preferences
    • cookies
    • customer profile or settings
  4. browser accept-language headers
  5. geolocation hints
  6. default application language

Query Parameters

Query parameters are often used to override every other language or application signal. If parameters are used, your customer (QE engineers or even end users) are intentionally trying to coerce the application into ignoring all other language signals. Query parameters beat out any other language signal when they are provided in the same request.

Domain name or Path Parameters

Sometimes you will partition your localized sites by domain name or by language tag paths. A domain name partition means that you select different or even localized domain names for specific markets. For example, your French site could be http://fr.example.com. You can also distinguish language preference on the path like this: http://example.com/fr or http://example.com/en-gb. When query parameters don’t exist, this is the next choice in our prioritization.

Persistent Settings

Of course, if your application has allowed the user to select a language preference, the application should honor that preference. The preference may be stored in a cookie or even in a user profile attribute on the server.

Accept-Language Header

Most browsers provide a list of user language preferences in each request. These languages are provided in request headers as values of the accept-language attribute. This attribute can have 1 or more language codes, and they indicate the priority of the user when requesting content. In the absence of other signals, your application should respond to the accept-language header.

Geolocation Hints

The last signal that actually provides information about the user is the geographic location from which the user is accessing your content. Although imperfect and imprecise, geography can provide a hint to your customer’s language preference. It’s definitely not the best indicator because multiple languages can be spoken in any geographic location. In a pinch, though, you may be able to provide a language selection tool that provides a list of the most prominent languages spoken in a specific area of the world.

Default Application Language

Finally, when all else fails and there have been no other indicators, you can provide the UI in the default language of the application. If your company is in Germany, maybe the default is German. If it’s the U.S., your default language is most likely English…or maybe even Spanish. You have to display the application in some language, and the default at this point is your last option.

In Summary

To summarize, a web application can serve a global audience. In doing so, it may accommodate customers in a variety of languages. Your application’s user interface may be selected from numerous possibilities, numerous signals from the user. Those signals are important data points to consider when making the language choice to present to the user. Using the signals described in this article, you’ll be able to consider some of the more important language preference indicators. Follow the prioritization I’ve outlined here, and you’ll make the right language choice most of the time…until you don’t. And there will be times when you don’t make the right choice from all these signals. When that happens, and it will happen, you have to give your users some way to indicate that problem. Take a look at my previous blog entry about language selection widgets for help with that.

 

 

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Chrome begins to lead in browser share

December 21st, 2011 joconner No comments

Chrome share

Today I noticed that the Chrome browser is currently leading in the market share wars…at least on my site, which is the most important indicator. :)

 

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Categories: Web Tags: ,

Deconstructing BCP 47

November 29th, 2011 joconner No comments

BCP 47 stands for Best Common Practice 47, and even without the acronym, the name alone means almost nothing. So, what is BCP 47?

BCP 47 is the current best practice for creating language codes. A language code is a text identifier that specifies a specific human language, and the code provides the means to define the language in terms of a basic language, a script used to write that language, and even a particular region in which the language is used. BCP 47 prescribes the code and its parts with enough precision to uniquely identify a natural, human language and distinguish it from other languages.

BCP 47 is a standard that uses other standards, and it prescribes how to combine those standards together to create a language code. BCP 47 is a combination of at least the following existing standards:

Why is this important to you in the internationalization or localization business? It is important because our industry requires common standards and agreement for how to communicate, transfer, and exchange language data. A BCP 47 tag is necessary to accurately identify language text across different applications and tools.

Lots of existing applications, tools, and platforms already use BCP 47:

This is not an exhaustive list, but hopefully it gives you a sense of the importance of this standard. When you need to tag data with a language identifier, you should seriously consider BCP 47 instead of any home-grown convention.

Having provided plenty of links in this post, I hope you’ll take some time to familiarize yourself with this important language tagging standard. Happy reading!

 

 

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Categories: Language, Standards, Web Tags:

Google’s Dart is JavaScript++?

October 11th, 2011 joconner No comments

Several years ago, Google was unhappy with the pace of change in the Java language and community. Their solution was to create the Dalvik VM and their Android platform. They were careful to not call it a Java platform, a Java implementation, JVM, or JRE; instead, they said it was the Java language on the Dalvik VM.

Now is Google doing something similar to JavaScript? It is true that the JavaScript language is evolving slowly. Google certainly has shown that it can innovate without a standards body before (see Java above). Is Google trying the same thing again, but with JavaScript? Is Google attempting to ignore the Ecmascript/JavaScript standards community and move ahead without them?

Google has a new language called Dart. This language is like JavaScript, but has many new language features. It will be interesting to see if Google gets as much benefit and praise for this as they did Android and the Dalvik VM.

More on Dart:

What I find so interesting about the Dart announcement is that Google already has a great tool for developing web applications without coding directly in JavaScript — It’s GWT, the Google Web Toolkit. Basically, it’s their very popular toolset for writing applications in Java and compiling it down to browser neutral JavaScript. If you’re unfamiliar with GWT, yes, you read that correctly…a compiler from Java to JavaScript. As a user of GWT, I can say that it works great! And this has great appeal in the developer community already. So why Dart? Why yet another language that they compile to JavaScript?

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: +2 (from 2 votes)
Categories: JavaScript, Web Tags: , ,

Answers to Which Countries Have Multiple Time Zones

October 6th, 2011 joconner No comments

Yesterday I asked the question:

Which countries have multiple time zones?

And I promised an answer today. Congratulations to Paul Clapham, who made a great effort listing them!

The W3C document Working with Time Zones is the source of my information. That document lists the following countries as having more than one time zone:

  • Argentina
  • Australia
  • Brazil
  • Canada
  • Chile
  • Democratic Republic of the Congo
  • Ecuador
  • France
  • Greenland
  • Indonesia
  • Kazakhstan
  • Kiribati
  • Mexico
  • Micronesia
  • Mongolia
  • New Zealand
  • Portugal
  • Russia
  • Spain
  • The United States

 

VN:F [1.9.22_1171]
Rating: 3.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

The difference between 1st and 3rd party cookies

September 8th, 2011 joconner No comments

The question: What’s a third party cookie? OK, let’s assume I’m an expert at these things, which I’m not, but let’s just assume that I play an expert at these things. Here’s your answer….

Cookies are small pieces of information stored in your browser’s cached files. If you visit a site, say example.com, that site might decide to store some state on your browser — a cookie. The cookie is a 1st party cookie because it is created and sent back and forth between your computer and that site, example.com, in your browser’s url field.

So what’s a 3rd party cookie? Well, often a document will fetch additional pieces of information from other sites, maybe a javascript file or an image, or maybe even entire documents. Anytime the document from example.com imports a file or script or image from a different web site (the 3rd party site), that site can also set cookies. Those cookies are 3rd party cookies.

Let’s look at this a little more closely. Imagine you browse to http://example.com/hello.html. This site might send back a 1st party cookie: FOO=1. The cookie could be stored in the domain of example.com, and only visits to that example.com would prompt the browser to automatically send that cookie value to example.com on subsequent visits. Because of the rules around cookie security, however, your browser would never send an example.com cookie to another site like example2.com.

Now imagine that the example.com/hello.html file has additional links to other sites. Maybe hello.html has an image link that pulls a photo from example2.com. Now example2.com is being called from your example.com/hello.html document. Your browser will not send any example.com cookie values to the referenced example2.com site. However, the example2 site may decide to drop a cookie as well. Since it is not the primary site of your document, which is example.com/hello.html, the example2.com cookie is called a 3rd party cookie.

Hmmm… so here we have examples of 1st party and 3rd party cookies. So, what’s a 2nd party cookie? I don’t actually know the answer to that question. If the site of your document is the 1st party and referenced sites are 3rd party, that really leaves the browser or its user as the 2nd party. Maybe a 2nd party cookie (which I’ve never really heard in any discussion) would simply be a cookie manually created by the user? Hmmmm…. probably not an important point. However, hopefully you know the difference between 1st and 3rd party cookies!

Cookie example

VN:F [1.9.22_1171]
Rating: 4.5/5 (2 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)
Categories: Web Tags: , ,

Encoding URLs for non-ASCII query params

June 24th, 2011 joconner No comments

Are you a web service API developer? The web truly is a world-wide web. Unfortunately, a great number of globally unaware developers are on the global web. This creates an odd situation in which web services are globally accessible but only locally or regionally aware.

There are a few important things to remember when creating a global web service. Let’s just cover ONE today: non-ASCII query parameters are valid, useful, and often necessary for a decent, global web service.

It seems so obvious to me, and it probably does to you. Sometimes a service needs to exchange or process non-ASCII data. The world is a big place, and although English is an important part of the global web, more people speak a different language. English is a big percent, but lots of people use Chinese or an Indic language too. Let’s make sure your web service can process all those non-ASCII characters in English or any other language!

Let’s look at some examples of non-ASCII query params:

  • http://example.com?name=田中&city=東京
  • http://example.com?名前=田中&市=東京

In these examples, you must perform two steps to get the query params (both keys and values) into the correct form:

  1. Convert the keys and their values to UTF-8 if they are not already.
  2. Perform the “percent encoding” on each UTF-8 code unit

To do #1, you’ll need to use whatever character conversion utility you have in your developer’s library: the Java charset encoding converters, whatever.

The #2 step is the important one for this blog. For each hexadecimal code unit in the UTF-8 query portion, you must “percent encode” the code unit. Let’s look at the first example query params:

name=田中&city=東京

The JavaScript function encodeURI actually does a good job of doing this for us:

encodeURI("name=田中&city=東京") produces the string:

name=%E7%94%B0%E4%B8%AD&city=%E6%9D%B1%E4%BA%AC

Notice that you should also include this encoding for the keys in the param list. In the next example, I’ve used Japanese values for both keys and values.

encodeURI(“名前=田中&市=東京”) produces this string:

%E5%90%8D%E5%89%8D=%E7%94%B0%E4%B8%AD&%E5%B8%82=%E6%9D%B1%E4%BA%AC”

Note that both the keys and vaues have been “percent encoded”.

On the server side, your server will understand how to decode these values into their correct UTF-8 string values if you have configured it correctly. Correct configuration of a server usually involves a charset conversion filter for a servlet container and sometimes just a config setting for Apache.

More on this at a later time.

 

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Categories: JavaScript, Unicode, Web Tags:

Twitter begins crowd-sourced translations

February 15th, 2011 joconner No comments

Recently I became aware of Twitter’s new translation initiative that enlists the help of its user base. I think it’s a unique and possibly worthwhile gamble. After all, the translations are free, and twitter pays it users by giving them a …. “special badge on their public Twitter page displaying their status as an official Twitter translator.”

The idea is simple enough. An invited twitterer/translator logs into their site. Having been identified as a translator, the user sees additional buttons on their twitter web UI…buttons that allow you to translate the page labels and text. Cool.

Twitter wants to translate into all the world’s language eventually. For now, however, they’ll settle on these in the short term:

  • French
  • German
  • Indonesian
  • Italian
  • Japanese
  • Korean
  • Spanish

Hey, great idea, Twitter. I wonder if the “special badge” of honor will be enough to enlist talented, real help?

 

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Categories: Web Tags: , ,