Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Localization of data

Localization of data

Scheduled Pinned Locked Moved C#
questiondatabasemysqldesign
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Herhighness
    wrote on last edited by
    #1

    My application pulls data from a MySQL database and saves it as CSV file. I have to localize this. the main requirement is that date and number format should be localized while making the CSV file. for ex in German, the delimiter should be ";" instead of " ," . and numbers should have , in place of decimal(1.23 should be 1, 23) and also the date should be in correct format. now the data I am pulling could be of any type, string, single, double, how can I know the type of pulled data, and format it for the installed UI culture before saving it to the CSV file. I know that I can find out the type of the column pulled, and use that, is there a better an efficient way ? Any ideas ? Thanks, Arti

    D 1 Reply Last reply
    0
    • H Herhighness

      My application pulls data from a MySQL database and saves it as CSV file. I have to localize this. the main requirement is that date and number format should be localized while making the CSV file. for ex in German, the delimiter should be ";" instead of " ," . and numbers should have , in place of decimal(1.23 should be 1, 23) and also the date should be in correct format. now the data I am pulling could be of any type, string, single, double, how can I know the type of pulled data, and format it for the installed UI culture before saving it to the CSV file. I know that I can find out the type of the column pulled, and use that, is there a better an efficient way ? Any ideas ? Thanks, Arti

      D Offline
      D Offline
      dead_link
      wrote on last edited by
      #2

      IMHO the most simple solution will be to write data in binary mode. After that data will be automatically reformatted according to local settings of the target computer while reading.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups