The built-in Localize class documentation will help you here. It is used like this:
Take a look at your EE source code in many of the core files - one example is the
libraries/Template.php file - you will see lots of usage of the line of code above. EE handles this internally so you most likely don't need to worry about it.
EDIT 1: Look at the EE source code for the date fieldtype
If you look at the following file
fieldtypes/date/ft.date.php that will show you how to use the Localize class. You need to modify the
$data array that is saved. Look at the following methods:
- grid_save: Look for the
$this->settings['localize'] !== TRUE
- display_field: That shows you how to pull the localized string (if set)
- grid_display_settings: Look for the
This is a concrete example of exactly what you are trying to do (based on your question). You might want to just subclass the Date fieldtype and add your own customizations where needed - that way your plugin will stay in-line with the Ellis Lab development of the Date field (i.e. future proof it to some degree). Good luck.