I have debugged a few issues with modules that were loaded via the module loader (specifically the Forums module) concurrently with a language pack, and all these issues ended up being caused by the same thing.
When defining language files, it seems that a lot of individuals are defining them as arrays, just like we have them defined in our application. For example, <sugarroot>/include/language/<your_lang>.lang.php, this is what it may look like.
The problem with this is that it overrides the entire stock array, so if there are any additional array indexes, they are no longer a part of the array.Code:'moduleList' => array ( 'Home' => 'Accueil' , 'Dashboard' => 'Tableaux de bord' , 'Contacts' => 'Contacts' , 'Accounts' => 'Comptes' , 'Opportunities' => 'Affaires' , 'Cases' => 'Tickets' , 'Notes' => 'Notes' , 'Calls' => 'Appels' , 'Emails' => 'Emails' , 'Meetings' => 'Réunions' , 'Tasks' => 'Tâches' , 'Calendar' => 'Calendrier' , 'Leads' => 'Leads' , 'Quotes' => 'Devis' , 'Products' => 'Produits' , 'Reports' => 'Rapports' , 'Forecasts' => 'Prévisions' , 'ForecastSchedule'=>'Planification Prévision', 'MergeRecords'=>'Fusionner Enregistrements', 'Quotas' => 'Objectifs', 'Teams' => 'Equipes' , 'Activities' => 'Activités' , 'Bugs' => 'Suivi Bugs' , 'Feeds' => 'Flux RSS' , 'iFrames' => 'Mon Portail' , 'TimePeriods' => 'Périodes' , 'Project' => 'Projets' , 'ProjectTask' => 'Tâches Projet' , 'Campaigns' => 'Campagnes' , 'Documents' => 'Documents' , 'Sync' => 'Sync' , 'ReportMaker' => 'SweetReports' , 'WorkFlow' => 'Work Flow' , 'Users' => 'Utilisateurs' , 'Releases' => 'Releases' , 'Prospects' => 'Prospects' , 'Queues' => 'Queues' , 'EmailMarketing' => 'Email Marketing' , 'EmailTemplates' => 'Email Modèles' , 'ProspectLists' => 'Listes des Prospects' , 'SavedSearch' => 'Recherches Sauvegardées', 'Contracts' => 'Contrats' ),
For example, when you load the Forums module, it adds the line below:
To avoid overriding this, and all the other custom array indexes, I'd suggest defining them as follows:Code:'Forums' => 'Forums',
If anyone sees any reason why all arrays should not be defined as shown above, please feel free to let me know.Code:$app_list_strings['moduleList']['Home'] = 'Accueil'; $app_list_strings['moduleList']['Dashboard'] = 'Tableaux de bord'; $app_list_strings['moduleList']['Contacts'] = ''Contacts''; ... ... $app_list_strings['moduleList']['Contracts'] = ''Contrats";
I've attached a script that will convert all array definitions from the first illustrated format to the second. Please place it in your webroot, access the script, type in the path to the language pack file, and execute!
Thanks,
-Sadek


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks