Question

I am building a small application for an english speaking client in Japan. As part of the app, users need to be able to enter their address. Unfortunately, I can't find any reference for how addresses are usually handled in an online form.

I know that there are different combinations of wards/prefectures/cities; do these all usually have their own field in a database? Is it standard for all of that to go into a general "city" type of field? What's the standard UI for this sort of thing?

Was it helpful?

Solution

The Universal Postal Union has compiled info on address formats in different countries. See also an unofficial guide to postal addresses.

But as a rule, internationalization of software typically means that for postal addresses, you avoid imposing any specific format. Instead, you would use a free-form text input area, of sufficient size. There are often many forms of addresses used in a country (and Japan is no exception), and normally you need not enforce any specific format – instead, you expect people to know their own address and how to enter it so that postal services can understand it.

OTHER TIPS

it depends on what you have to do with the address:

if you have to:

  • check for obligatory fields
  • validate fields, or
  • query for city, prefecture, postal code, etc.

then you should use separate fields. UI: a form with text-inputs (and maybe even menus).

do not use more fields than necessary, so if you don't have any of the mentioned needs, just use a text-field (UI: textarea).

The first part of a Japanese address is easy: Todofuken will either be 2 or 3 characters, followed by either "都","道","府" or "県". Where it gets tricky is the rest of the address since smaller areas don't always divide their cities neatly.

What I've seen to make this easier is using the postal code to render the address. The bad news is that I haven't seen any of this in Ruby but I have seen it in other languages so hopefully this will help.

This site is only in Japanese, but maybe you can download the code and check it out: http://www.kawa.net/works/ajax/ajaxzip2/ajaxzip2.html

There's also this add-in for Excel that converts addresses. The code may be helpful to you: http://office.microsoft.com/ja-jp/excel-help/HP010077514.aspx

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top