Merge pull request #19594 from eileenmcnaughton/535m
[civicrm-core.git] / setup / plugins / blocks / l10n.tpl.php
CommitLineData
cfb48750
TO
1<?php if (!defined('CIVI_SETUP')): exit("Installation plugins must only be loaded by the installer.\n");
2endif; ?>
4bcd4c62
TO
3<h2><?php echo ts('Localization'); ?></h2>
4
5<p><?php echo ts('CiviCRM has been translated to many languages, thanks to its community of translators. By selecting another language, the installer may be available in that language. The initial configuration of the basic data will also be set to that language (ex: individual prefixes, suffixes, activity types, etc.). <a href="%1" target="%2">Learn more about using CiviCRM in other languages.</a>', array(1 => 'http://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=88408149', 2 => '_blank')); ?></p>
6
7<script>
8 function civicrmInstallerSetLanguage(language) {
9 var location = window.location.toString();
10
11 if (location.match(/lang=.._../)) {
12 location = location.replace(/lang=.._../, 'lang=' + language);
13 window.location = location;
14 }
15 else {
16 window.location += (location.indexOf('?') < 0 ? '?' : '&') + 'lang=' + language;
17 }
18 }
19</script>
20
21<p style="margin-left: 2em" id="locale">
22 <label for="lang"><span><?php echo ts('Language of basic data:'); ?></span></label>
23 <select id="lang" name="lang" onchange="civicrmInstallerSetLanguage(this.value);">
24 <?php
25 foreach ($model->getField('lang', 'options') as $locale => $language):
26 $selected = ($locale == $model->lang) ? 'selected="selected"' : '';
27 echo "<option value='$locale' $selected>$language</option>";
28 endforeach;
29 ?>
30 </select>
31
32 <span class="advancedTip">
33 <?php
34 if (count($model->getField('lang', 'options')) < 2):
35 echo "(download the civicrm-{$civicrm_version}-l10n.tar.gz file and unzip into CiviCRM’s directory to add languages here)";
36 endif;
37 ?>
38</span>
39</p>