Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

Multi-language number format

Codes here !

Moderators: macek, egami, gesf

Multi-language number format

Postby fotobob » Mon May 14, 2012 9:44 pm

I need to create a situation where data entry in admin is done in two languages - Italian and English, then is displayed on the site in one or the other language. The problem is this: number formats are different in each of the languages (1,234.55 or 1.234,55) and as I understand it, this is not a problem when it comes to displaying the numbers on the site. However, what I'm trying to discover is: the admin will be done according to the language of the user and I would like to not force one to have to use the number format of the other as it leaves open the possibility of errors. Is there a way to do the reverse of formatting numbers on read when doing a write to the db? i.e if db is 1235.55 it can be read as 1,234.55 or 1.234,55, can it be entered as 1,234.55 or 1.234,55 then get written to the db as 1234.55?
fotobob
New php-forum User
New php-forum User
 
Posts: 1
Joined: Mon May 14, 2012 9:31 pm

Return to mySQL & php coding

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.