Ambigua a écritSalut !
Je connais pas la méthode de programmation, mais y'a pas moyen d'utiliser les fichiers langues déja existant ?
Y'a pas de mots particuliers pour nécessiter de faire un fichier lang spécifique non ?
Ca resolverai immédiatement le probleme de la diffusion ..si tu utilises les fichiers déjà présent par defaut ..
Le principal problème vient de moi. Pour préciser, des méthodes que j'emploie
Il y a un outil global (gettext), qui permet d'uniformiser la gestion des langues quelque soit le projet, son language de programmation, sa distribution, voir son OS. Or, comme je n'y comprenais rien, et que j'avais pas envi de m'y investir, j'ai crée ma propre méthode.
Cependant, vu l'ampleur du projet, ma méthode n'est pas si mal. Son défaut en plus de ne pas être standart, est justement de ne pas pourvoir être "interfacé" comme tu le décris. Logique, çà va de pair
D'une manière plus technique, chaque locale prend sa place dans un "package" perl, sous la forme de fichiers individuels.
Par exemple, pour l'anglais çà donne çà :
package Locale_en;
############################## MailPictures v0.93 - Locale_en.pm ################################
# #
# Guillaume Tissier (razerraz-AT-free.fr) #
# #
#################################################################################################
use constant TRUE => 1 ;
use constant FALSE => 0 ;
## ------------------------------------- English -------------------------------------------- ##
%guitext = (
"winapp" => "Email My Pictures",
"resizebtnlbl" => "Resize images",
"hqresbtn" => "High Quality: 1024 pixels width",
"mqresbtn" => "Medium Quality: 800 pixels width",
"lqresbtn" => "Low Quality: 640 pixels width",
"ctresbtn" => "Use a custom width",
"mailframe" => "<b>Send to:</b>",
"folderframe" => "Folder",
"optframe" => "<b>General settings</b>",
"jpgbtnlbl" => "Change JPEG compression",
"zipbtnlbl" => "Create Zip archive with the pictures",
"zipnamelbl" => "Name of the archive:",
"svgbtnlbl" => "Save current settings",
"getsizebtn" => "Estimate the size of attachment",
"hidediaglbl" => "Always use the current settings for pictures",
"zipdiaglbl" => "Create zip archive for several data files",
"filesnbrlbl" => "Minimal number of data files for zip:",
"sizelbl" => "",
"progress_win" => "MailPictures Processing",
"progress_label"=> "Processing, please wait");
%launchdialog = (
"launchdialog" => "Email My Pictures",
"launchlbl" => "There are at least one picture in your selection.\n"
."Do you want to open the main window for reducing size?\n",
"conflbl" => "The current settings are:",
"resolbl" => "Pictures width:",
"resosetlbl" => "Unchanged",
"jpglbl" => "Jpeg compression:",
"jpgsetlbl" => "Unchanged",
"ziplbl" => "Create zip archive:",
"hidebtn" => "Always use the current settings",
"launchbtn1" => "Open main window",
"launchbtn2" => "Use current settings");
%zipdialog = (
"zipdialog" => "Send files by email",
"zipmainlbl" => "You have selected several data files to send.\n"
."Generaly, creating an archive is a good choice in this case\n"
."An archive is a simple file who can contain all the files you\n"
."have selected.\n\n"
."You can already set the archive name if you choose to create one.",
"zipquestlbl" => "Do you want to create an archive with the files ?",
"ziphidebtn" => "Don't show this message again, never create archive");
%gtkmsg = (
"resizemsg" => "Resizing: ",
"copymsg" => "Copying files to: ",
"zipcreate" => "Creating archive: ",
"mailerload" => "Loading mail program...",
"foldermove" => "Moving Images to folder");
%errmsg = (
"imlib" => "Problem with Imlib Perl library, check your settings!",
"uri" => "Problem with URI Perl library, check your settings!",
"gtk" => "Gtk2 or Glade 2 perl library was not found on your system!",
"emptysel" => "You don't have selected any file to proceed!",
"nomailer" => "Mail client selected was not found, check your settings!",
"warnsize" => "Warning: the total size of your selection takes more than 5 Mo.\n"
."Sending an email with this selection will probably fail\n\n"
."Please select less files or change the settings, and try again\n");
sub guitext {
return (%guitext);
}
sub launchdialog {
return (%launchdialog);
}
sub zipdialog {
return (%zipdialog);
}
sub gtkmsg {
return (%gtkmsg);
}
sub errmsg {
return (%errmsg);
}
1;