Accomplish with busisness expending, application require to support for languge user speaks, we need to implement software display cultrue languages.

The culture, you must notice country have very different way to do the samething, you need to investigate in everywhere of product. Still, it's not the techinican do, so here is technical points:

  • DateTime - Product work in different time zone, display format and it's bad you miss it
  • Encoding - The store encoding, sorting rules, it's quite different
  • Currency - Money always have different pre/postfix, eg: $10
  • Numeric - Thousandth, you may want it or not

In postgresql database:

You will need 'without time zone' to store at time 'UTC' datetimes.

It's better to use numeric to stop lose precision.

'LC_Collate' and 'LC_CTYPE' for you database, you OS should have corresponding locale installed, you may need custom 'COLLATION' for sorting


drop table if exists lan ;

create table lan
	id int not null,
	idate date not null default (now() at time zone 'UTC'),
	itime time not null default (now() at time zone 'UTC'),
	--ztime time with time zone not null default (now() at time zone 'UTC'),
	itimestamp timestamp not null default (now() at time zone 'UTC'),
	ztimestamp timestamp with time zone not null default (now() at time zone 'UTC'),
	cost numeric(80, 36) not null default 1000000.0000000000000000000001,
	num bigint not null default 1000000.0000000000000000000001,
	txt varchar

insert into lan(id,txt) values('00000001','杨');
insert into lan(id,txt) values('00000001','李');
insert into lan(id,txt) values('00000001','王');


SELECT to_char (1234567890999999.8,'99 999 999 999 999 990D99');
SELECT to_char(123.456, 'FM¥999990D00')


select * from lan order by txt COLLATE "zh_cn"
select * from lan order by txt COLLATE "en_US"

For programming:

You will need decimal like types

UTC datetime format

Uniform data format for APIs


Display strings according to culture info, components should be carefully chosen that must fit the requirements.