Adobe InDesign
Calendar Wizard

by Scott Selberg

Language Support

The script currently supports 20+ languages, most of which have been submitted by users.

To add a new language, the file ../calendarWizard/source-files/language.js needs to be modified in two places. Towards the top is a list of langageOptions. (Do a word search for "settings.languageOptions".) Add the english name for the new language into the list in alphabetical order.

settings.languageOptions         = new Array( 'English', 
'Catalan',
'Czech',
'Basque',
'Danish',
'Dutch',
'Estonian',
'Finnish',
'French',
'German',
'Greek',
'Hungarian',
'Italian',
'Norwegian',
'Polish',
'Portuguese',
'Romanian',
'Spanish',
'Swedish',
'Turkish'
);

 

The second modification is made in the "selectLangauge" subroutine at the bottom of the script. To add another language copy and paste an else/if block and modify it as needed. The english name of the language in the firt part modification to match the name of the langage in the second modification.

   ...    else if( settings.languageOptions[ selector.Language.selectedIndex ] == "French" )
{
settings.months = new Array( 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin',
'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');
settings.daysLong = new Array( 'Dimanche', 'Lundi', 'Mardi', 'Mercredi',
'Jeudi', 'Vendredi', 'Samedi' );
settings.daysMid = new Array( 'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam' );
settings.daysShort = new Array( 'D', 'L', 'M', 'M', 'J', 'V', 'S' );
}
else if( settings.languageOptions[ selector.Language.selectedIndex ] == "German" )
{
settings.months = new Array( 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni',
'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember');
settings.daysLong = new Array( 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch',
'Donnerstag', 'Freitag', 'Samstag' );
settings.daysMid = new Array( 'Son', 'Mon', 'Die', 'Mit', 'Don', 'Fre', 'Sam' );
settings.daysShort = new Array( 'S', 'M', 'D', 'M', 'D', 'F', 'S' );
}
else if( settings.languageOptions[ selector.Language.selectedIndex ] == "Greek" )
{
settings.months = new Array( 'Ιανου?ριος', 'Φεβρου?ριος', 'Μ?ρτιος', 'Απρ?λιος', 'Μ?ιος', 'Ιο?νιος',
'Ιο?λιος', 'Α?γουστος', 'Σεπτ?μβριος', 'Οκτ?βριος', 'Νο?μβριος', 'Δεκ?μβριος');
settings.daysLong = new Array( 'Κυριακ?', 'Δευτ?ρα', 'Τρ?τη', 'Τετ?ρτη',
'Π?μπτη', 'Παρασκευ?', 'Σ?ββατο' );
settings.daysMid = new Array( 'Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ' );
settings.daysShort = new Array( 'Κ', 'Δ', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σ' ); months = monthsGreek;
} ...

 

Once complete, email the modified script to the author and I'll include the language changes in the released version.