Adding translations to installation profile upon installation
You must include locale.inc before:

include_once DRUPAL_ROOT . '/includes/locale.inc';
locale_add_language('fr', 'French', 'Français', LANGUAGE_LTR, '', '', true, true);