当前位置: 首页>>代码示例>>PHP>>正文


PHP WT_I18N::translate_c方法代码示例

本文整理汇总了PHP中WT_I18N::translate_c方法的典型用法代码示例。如果您正苦于以下问题:PHP WT_I18N::translate_c方法的具体用法?PHP WT_I18N::translate_c怎么用?PHP WT_I18N::translate_c使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WT_I18N的用法示例。


在下文中一共展示了WT_I18N::translate_c方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getValue

 public static function getValue($type, $record = null)
 {
     if ($record instanceof WT_Individual) {
         $sex = $record->getSex();
     } else {
         $sex = 'U';
     }
     switch ($type) {
         case 'birth':
             switch ($sex) {
                 case 'U':
                     return WT_I18N::translate_c('Pedigree', 'Birth');
                 case 'M':
                     return WT_I18N::translate_c('Male pedigree', 'Birth');
                 case 'F':
                     return WT_I18N::translate_c('Female pedigree', 'Birth');
             }
         case 'adopted':
             switch ($sex) {
                 case 'U':
                     return WT_I18N::translate_c('Pedigree', 'Adopted');
                 case 'M':
                     return WT_I18N::translate_c('Male pedigree', 'Adopted');
                 case 'F':
                     return WT_I18N::translate_c('Female pedigree', 'Adopted');
             }
         case 'foster':
             switch ($sex) {
                 case 'U':
                     return WT_I18N::translate_c('Pedigree', 'Foster');
                 case 'M':
                     return WT_I18N::translate_c('Male pedigree', 'Foster');
                 case 'F':
                     return WT_I18N::translate_c('Female pedigree', 'Foster');
             }
         case 'sealing':
             switch ($sex) {
                 case 'U':
                     return WT_I18N::translate_c('Pedigree', 'Sealing');
                 case 'M':
                     return WT_I18N::translate_c('Male pedigree', 'Sealing');
                 case 'F':
                     return WT_I18N::translate_c('Female pedigree', 'Sealing');
             }
         case 'rada':
             // Not standard GEDCOM - a webtrees extension
             // This is an arabic word which does not exist in other languages.
             // So, it will not have any inflected forms.
             return WT_I18N::translate('Rada');
         default:
             return $type;
     }
 }
开发者ID:brambravo,项目名称:webtrees,代码行数:53,代码来源:Pedi.php

示例2: getValue

 public static function getValue($type, $record = null)
 {
     if ($record instanceof WT_Individual) {
         $sex = $record->getSex();
     } else {
         $sex = 'U';
     }
     switch ($type) {
         case 'BOTH':
             switch ($sex) {
                 case 'M':
                     return WT_I18N::translate_c('MALE', 'Adopted by both parents');
                 case 'F':
                     return WT_I18N::translate_c('FEMALE', 'Adopted by both parents');
                 default:
                     return WT_I18N::translate('Adopted by both parents');
             }
         case 'HUSB':
             switch ($sex) {
                 case 'M':
                     return WT_I18N::translate_c('MALE', 'Adopted by father');
                 case 'F':
                     return WT_I18N::translate_c('FEMALE', 'Adopted by father');
                 default:
                     return WT_I18N::translate('Adopted by father');
             }
         case 'WIFE':
             switch ($sex) {
                 case 'M':
                     return WT_I18N::translate_c('MALE', 'Adopted by mother');
                 case 'F':
                     return WT_I18N::translate_c('FEMALE', 'Adopted by mother');
                 default:
                     return WT_I18N::translate('Adopted by mother');
             }
         default:
             return $type;
     }
 }
开发者ID:brambravo,项目名称:webtrees,代码行数:39,代码来源:Adop.php

示例3: get_relationship_name_from_path

function get_relationship_name_from_path($path, WT_Individual $person1 = null, WT_Individual $person2 = null)
{
    if (!preg_match('/^(mot|fat|par|hus|wif|spo|son|dau|chi|bro|sis|sib)*$/', $path)) {
        // TODO: Update all the “3 RELA ” values in class_person
        return '<span class="error">' . $path . '</span>';
    }
    // The path does not include the starting person.  In some languages, the
    // translation for a man’s (relative) is different to a woman’s (relative),
    // due to inflection.
    $sex1 = $person1 ? $person1->getSex() : 'U';
    // The sex of the last person in the relationship determines the name in
    // many cases.  e.g. great-aunt / great-uncle
    if (preg_match('/(fat|hus|son|bro)$/', $path)) {
        $sex2 = 'M';
    } elseif (preg_match('/(mot|wif|dau|sis)$/', $path)) {
        $sex2 = 'F';
    } else {
        $sex2 = 'U';
    }
    switch ($path) {
        case '':
            return WT_I18N::translate('self');
            //  Level One relationships
        //  Level One relationships
        case 'mot':
            return WT_I18N::translate('mother');
        case 'fat':
            return WT_I18N::translate('father');
        case 'par':
            return WT_I18N::translate('parent');
        case 'hus':
            if ($person1 && $person2) {
                foreach ($person1->getSpouseFamilies() as $family) {
                    if ($person2 === $family->getSpouse($person1)) {
                        if ($family->getFacts('_NMR')) {
                            return WT_I18N::translate_c('MALE', 'partner');
                        } elseif ($family->getFacts(WT_EVENTS_DIV)) {
                            return WT_I18N::translate('ex-husband');
                        }
                    }
                }
            }
            return WT_I18N::translate('husband');
        case 'wif':
            if ($person1 && $person1) {
                foreach ($person1->getSpouseFamilies() as $family) {
                    if ($person2 === $family->getSpouse($person1)) {
                        if ($family->getFacts('_NMR')) {
                            return WT_I18N::translate_c('FEMALE', 'partner');
                        } elseif ($family->getFacts(WT_EVENTS_DIV)) {
                            return WT_I18N::translate('ex-wife');
                        }
                    }
                }
            }
            return WT_I18N::translate('wife');
        case 'spo':
            if ($person1 && $person2) {
                foreach ($person1->getSpouseFamilies() as $family) {
                    if ($person2 === $family->getSpouse($person1)) {
                        if ($family->getFacts('_NMR')) {
                            return WT_I18N::translate_c('MALE/FEMALE', 'partner');
                        } elseif ($family->getFacts(WT_EVENTS_DIV)) {
                            return WT_I18N::translate('ex-spouse');
                        }
                    }
                }
            }
            return WT_I18N::translate('spouse');
        case 'son':
            return WT_I18N::translate('son');
        case 'dau':
            return WT_I18N::translate('daughter');
        case 'chi':
            return WT_I18N::translate('child');
        case 'bro':
            if ($person1 && $person2) {
                $dob1 = $person1->getBirthDate();
                $dob2 = $person2->getBirthDate();
                if ($dob1->isOK() && $dob2->isOK()) {
                    if (abs($dob1->JD() - $dob2->JD()) < 2 && !$dob1->qual1 && !$dob2->qual1) {
                        // Exclude BEF, AFT, etc.
                        return WT_I18N::translate('twin brother');
                    } elseif ($dob1->MaxJD() < $dob2->MinJD()) {
                        return WT_I18N::translate('younger brother');
                    } elseif ($dob1->MinJD() > $dob2->MaxJD()) {
                        return WT_I18N::translate('elder brother');
                    }
                }
            }
            return WT_I18N::translate('brother');
        case 'sis':
            if ($person1 && $person2) {
                $dob1 = $person1->getBirthDate();
                $dob2 = $person2->getBirthDate();
                if ($dob1->isOK() && $dob2->isOK()) {
                    if (abs($dob1->JD() - $dob2->JD()) < 2 && !$dob1->qual1 && !$dob2->qual1) {
                        // Exclude BEF, AFT, etc.
                        return WT_I18N::translate('twin sister');
                    } elseif ($dob1->MaxJD() < $dob2->MinJD()) {
//.........这里部分代码省略.........
开发者ID:brambravo,项目名称:webtrees,代码行数:101,代码来源:functions.php

示例4: add_simple_tag


//.........这里部分代码省略.........
                                    echo edit_field_username($element_name, $value);
                                } else {
                                    if ($fact == 'RESN') {
                                        echo edit_field_resn($element_name, $value);
                                    } else {
                                        if ($fact == '_PRIM') {
                                            echo '<select id="', $element_id, '" name="', $element_name, '" >';
                                            echo '<option value=""></option>';
                                            echo '<option value="Y"';
                                            if ($value == 'Y') {
                                                echo ' selected="selected"';
                                            }
                                            echo '>', WT_I18N::translate('yes'), '</option>';
                                            echo '<option value="N"';
                                            if ($value == 'N') {
                                                echo ' selected="selected"';
                                            }
                                            echo '>', WT_I18N::translate('no'), '</option>';
                                            echo '</select>';
                                        } else {
                                            if ($fact == 'SEX') {
                                                echo '<select id="', $element_id, '" name="', $element_name, '"><option value="M"';
                                                if ($value == 'M') {
                                                    echo ' selected="selected"';
                                                }
                                                echo '>', WT_I18N::translate('Male'), '</option><option value="F"';
                                                if ($value == 'F') {
                                                    echo ' selected="selected"';
                                                }
                                                echo '>', WT_I18N::translate('Female'), '</option><option value="U"';
                                                if ($value == 'U' || empty($value)) {
                                                    echo ' selected="selected"';
                                                }
                                                echo '>', WT_I18N::translate_c('unknown gender', 'Unknown'), '</option></select>';
                                            } else {
                                                if ($fact == 'TYPE' && $level == '3') {
                                                    //-- Build the selector for the Media 'TYPE' Fact
                                                    echo '<select name="text[]"><option selected="selected" value="" ></option>';
                                                    $selectedValue = strtolower($value);
                                                    if (!array_key_exists($selectedValue, WT_Gedcom_Tag::getFileFormTypes())) {
                                                        echo '<option selected="selected" value="', WT_Filter::escapeHtml($value), '" >', WT_Filter::escapeHtml($value), '</option>';
                                                    }
                                                    foreach (WT_Gedcom_Tag::getFileFormTypes() as $typeName => $typeValue) {
                                                        echo '<option value="', $typeName, '"';
                                                        if ($selectedValue == $typeName) {
                                                            echo ' selected="selected"';
                                                        }
                                                        echo '>', $typeValue, '</option>';
                                                    }
                                                    echo '</select>';
                                                } else {
                                                    if ($fact == 'NAME' && $upperlevel != 'REPO' || $fact == '_MARNM') {
                                                        // Populated in javascript from sub-tags
                                                        echo "<input type=\"hidden\" id=\"", $element_id, "\" name=\"", $element_name, "\" onchange=\"updateTextName('", $element_id, "');\" value=\"", WT_Filter::escapeHtml($value), "\" class=\"", $fact, "\">";
                                                        echo '<span id="', $element_id, '_display" dir="auto">', WT_Filter::escapeHtml($value), '</span>';
                                                        echo ' <a href="#edit_name" onclick="convertHidden(\'', $element_id, '\'); return false;" class="icon-edit_indi" title="' . WT_I18N::translate('Edit name') . '"></a>';
                                                    } else {
                                                        // textarea
                                                        if ($fact == 'TEXT' || $fact == 'ADDR' || $fact == 'NOTE' && !$islink) {
                                                            echo "<textarea id=\"", $element_id, "\" name=\"", $element_name, "\" dir=\"auto\">", WT_Filter::escapeHtml($value), "</textarea><br>";
                                                        } else {
                                                            // text
                                                            // If using GEDFact-assistant window
                                                            if ($action == "addnewnote_assisted") {
                                                                echo "<input type=\"text\" id=\"", $element_id, "\" name=\"", $element_name, "\" value=\"", WT_Filter::escapeHtml($value), "\" style=\"width:4.1em;\" dir=\"ltr\"";
                                                            } else {
开发者ID:jacoline,项目名称:webtrees,代码行数:67,代码来源:functions_edit.php

示例5: NUM_TO_SHORT_MONTH

 static function NUM_TO_SHORT_MONTH($n, $leap_year)
 {
     switch ($n) {
         case 1:
             return WT_I18N::translate_c('Abbreviation for Persian month: Farvardin', 'Far');
         case 2:
             return WT_I18N::translate_c('Abbreviation for Persian month: Ordibehesht', 'Ord');
         case 3:
             return WT_I18N::translate_c('Abbreviation for Persian month: Khordad', 'Khor');
         case 4:
             return WT_I18N::translate_c('Abbreviation for Persian month: Tir', 'Tir');
         case 5:
             return WT_I18N::translate_c('Abbreviation for Persian month: Mordad', 'Mor');
         case 6:
             return WT_I18N::translate_c('Abbreviation for Persian month: Shahrivar', 'Shah');
         case 7:
             return WT_I18N::translate_c('Abbreviation for Persian month: Mehr', 'Mehr');
         case 8:
             return WT_I18N::translate_c('Abbreviation for Persian month: Aban', 'Aban');
         case 9:
             return WT_I18N::translate_c('Abbreviation for Persian month: Azar', 'Azar');
         case 10:
             return WT_I18N::translate_c('Abbreviation for Persian month: Dey', 'Dey');
         case 11:
             return WT_I18N::translate_c('Abbreviation for Persian month: Bahman', 'Bah');
         case 12:
             return WT_I18N::translate_c('Abbreviation for Persian month: Esfand', 'Esf');
         default:
             return '';
     }
 }
开发者ID:sadr110,项目名称:webtrees,代码行数:31,代码来源:Jalali.php

示例6: width

     break;
 case 'SOUR_FACTS_QUICK':
     $title = WT_I18N::translate('Quick source facts');
     $text = WT_I18N::translate('This is the short list of GEDCOM source facts that appears next to the full list and can be added with a single click.');
     break;
 case 'SOUR_FACTS_UNIQUE':
     $title = WT_I18N::translate('Unique source facts');
     $text = WT_I18N::translate('This is the list of GEDCOM facts that your users can only add once to sources.  For example, if TITL is in this list, users will not be able to add more than one TITL record to a source.  Fact names that appear in this list must not also appear in the “All source facts” list.');
     break;
 case 'SUBLIST_TRIGGER_I':
     $title = WT_I18N::translate('Maximum number of surnames on individual list');
     $text = WT_I18N::translate('Long lists of individuals with the same surname can be broken into smaller sub-lists according to the first letter of the individual’s given name.<br><br>This option determines when sub-listing of surnames will occur.  To disable sub-listing completely, set this option to zero.');
     break;
 case 'SURNAME_TRADITION':
     $title = WT_I18N::translate('Surname tradition');
     $text = WT_I18N::translate('When you add a new family member, a default surname can be provided.  This surname will depend on the local tradition.') . '<br><br><dl><dt>' . WT_I18N::translate('patrilineal') . '</dt><dd>' . WT_I18N::translate('Children take their father’s surname.') . '</dd></dl><dl><dt>' . WT_I18N::translate('matrilineal') . '</dt><dd>' . WT_I18N::translate('Children take their mother’s surname.') . '</dd></dl><dl><dt>' . WT_I18N::translate_c('Surname tradition', 'paternal') . '</dt><dd>' . WT_I18N::translate('Children take their father’s surname.') . '<br>' . WT_I18N::translate('Wives take their husband’s surname.') . '</dd></dl><dl><dt>' . WT_I18N::translate_c('Surname tradition', 'Spanish') . '</dt><dd>' . WT_I18N::translate('Children take one surname from the father and one surname from the mother.') . '</dd></dl><dl><dt>' . WT_I18N::translate_c('Surname tradition', 'Portuguese') . '</dt><dd>' . WT_I18N::translate('Children take one surname from the mother and one surname from the father.') . '</dd></dl><dl><dt>' . WT_I18N::translate_c('Surname tradition', 'Icelandic') . '</dt><dd>' . WT_I18N::translate('Children take a patronym instead of a surname.') . '</dd></dl><dl><dt>' . WT_I18N::translate_c('Surname tradition', 'Polish') . '</dt><dd>' . WT_I18N::translate('Children take their father’s surname.') . '<br>' . WT_I18N::translate('Wives take their husband’s surname.') . '<br>' . WT_I18N::translate('Surnames are inflected to indicate an individual’s gender.') . '</dd></dl><dl><dt>' . WT_I18N::translate_c('Surname tradition', 'Lithuanian') . '</dt><dd>' . WT_I18N::translate('Children take their father’s surname.') . '<br>' . WT_I18N::translate('Wives take their husband’s surname.') . '<br>' . WT_I18N::translate('Surnames are inflected to indicate an individual’s gender and marital status.') . '</dd></dl>';
     break;
 case 'THEME':
     $title = WT_I18N::translate('Theme');
     $text = WT_I18N::translate('You can change the appearance of <b>webtrees</b> using “themes”.  Each theme has a different style, layout, color scheme, etc.') . '<br><br>' . WT_I18N::translate('Themes can be selected at three levels: user, GEDCOM, and site.  User settings take priority over GEDCOM settings, which in turn take priority over the site setting.  Selecting “default theme” at user level will give the setting for the current GEDCOM.  Selecting “default theme” at GEDCOM level will give the site setting.');
     break;
 case 'THUMBNAIL_WIDTH':
     $title = WT_I18N::translate('Width of generated thumbnails');
     $text = WT_I18N::translate('This is the width (in pixels) that the program will use when automatically generating thumbnails.  The default setting is 100.');
     break;
 case 'GEONAMES_ACCOUNT':
     $title = WT_I18N::translate('Use GeoNames database for autocomplete on places');
     $text = WT_I18N::translate('The website www.geonames.org provides a large database of place names.  This can be searched when entering new places.  To use this feature, you must register for a free account at www.geonames.org and provide the username.');
     break;
 case 'USE_REGISTRATION_MODULE':
     $title = WT_I18N::translate('Allow visitors to request account registration');
开发者ID:brambravo,项目名称:webtrees,代码行数:31,代码来源:help_text.php

示例7: calendar_list_text

function calendar_list_text($list, $tag1, $tag2, $show_sex_symbols)
{
    global $males, $females;
    $html = '';
    foreach ($list as $id => $facts) {
        $tmp = WT_GedcomRecord::GetInstance($id);
        $html .= $tag1 . '<a href="' . $tmp->getHtmlUrl() . '">' . $tmp->getFullName() . '</a> ';
        if ($show_sex_symbols && $tmp instanceof WT_Individual) {
            switch ($tmp->getSex()) {
                case 'M':
                    $html .= '<i class="icon-sex_m_9x9" title="' . WT_I18N::translate('Male') . '"></i>';
                    ++$males;
                    break;
                case 'F':
                    $html .= '<i class="icon-sex_f_9x9" title="' . WT_I18N::translate('Female') . '"></i>';
                    ++$females;
                    break;
                default:
                    $html .= '<i class="icon-sex_u_9x9" title="' . WT_I18N::translate_c('unknown gender', 'Unknown') . '"></i>';
                    break;
            }
        }
        $html .= '<div class="indent">' . $facts . '</div>' . $tag2;
    }
    return $html;
}
开发者ID:brambravo,项目名称:webtrees,代码行数:26,代码来源:calendar.php

示例8: init_calendar_popup

/**
 * javascript declaration for calendar popup
 */
function init_calendar_popup()
{
    global $WEEK_START, $controller;
    $controller->addInlineJavascript('
		cal_setMonthNames(
			"' . WT_I18N::translate_c('NOMINATIVE', 'January') . '",
			"' . WT_I18N::translate_c('NOMINATIVE', 'February') . '",
			"' . WT_I18N::translate_c('NOMINATIVE', 'March') . '",
			"' . WT_I18N::translate_c('NOMINATIVE', 'April') . '",
			"' . WT_I18N::translate_c('NOMINATIVE', 'May') . '",
			"' . WT_I18N::translate_c('NOMINATIVE', 'June') . '",
			"' . WT_I18N::translate_c('NOMINATIVE', 'July') . '",
			"' . WT_I18N::translate_c('NOMINATIVE', 'August') . '",
			"' . WT_I18N::translate_c('NOMINATIVE', 'September') . '",
			"' . WT_I18N::translate_c('NOMINATIVE', 'October') . '",
			"' . WT_I18N::translate_c('NOMINATIVE', 'November') . '",
			"' . WT_I18N::translate_c('NOMINATIVE', 'December') . '"
		)
		cal_setDayHeaders(
			"' . WT_I18N::translate('Sun') . '",
			"' . WT_I18N::translate('Mon') . '",
			"' . WT_I18N::translate('Tue') . '",
			"' . WT_I18N::translate('Wed') . '",
			"' . WT_I18N::translate('Thu') . '",
			"' . WT_I18N::translate('Fri') . '",
			"' . WT_I18N::translate('Sat') . '"
		)
		cal_setWeekStart(' . $WEEK_START . ');
	');
}
开发者ID:brambravo,项目名称:webtrees,代码行数:33,代码来源:functions_print.php

示例9: NUM_TO_MONTH_INSTRUMENTAL

 static function NUM_TO_MONTH_INSTRUMENTAL($n, $leap_year)
 {
     switch ($n) {
         case 1:
             return WT_I18N::translate_c('INSTRUMENTAL', 'Tishrei');
         case 2:
             return WT_I18N::translate_c('INSTRUMENTAL', 'Heshvan');
         case 3:
             return WT_I18N::translate_c('INSTRUMENTAL', 'Kislev');
         case 4:
             return WT_I18N::translate_c('INSTRUMENTAL', 'Tevet');
         case 5:
             return WT_I18N::translate_c('INSTRUMENTAL', 'Shevat');
         case 6:
             if ($leap_year) {
                 return WT_I18N::translate_c('INSTRUMENTAL', 'Adar I');
             } else {
                 return WT_I18N::translate_c('INSTRUMENTAL', 'Adar');
             }
         case 7:
             return WT_I18N::translate_c('INSTRUMENTAL', 'Adar II');
         case 8:
             return WT_I18N::translate_c('INSTRUMENTAL', 'Nissan');
         case 9:
             return WT_I18N::translate_c('INSTRUMENTAL', 'Iyar');
         case 10:
             return WT_I18N::translate_c('INSTRUMENTAL', 'Sivan');
         case 11:
             return WT_I18N::translate_c('INSTRUMENTAL', 'Tamuz');
         case 12:
             return WT_I18N::translate_c('INSTRUMENTAL', 'Av');
         case 13:
             return WT_I18N::translate_c('INSTRUMENTAL', 'Elul');
         default:
             return '';
     }
 }
开发者ID:sadr110,项目名称:webtrees,代码行数:37,代码来源:Jewish.php

示例10: help_link

			<tr>
				<th colspan="2">
					<?php 
echo WT_I18N::translate('Other settings');
?>
				</th>
			</tr>
			<tr>
				<td>
					<?php 
echo WT_I18N::translate('Surname tradition'), help_link('SURNAME_TRADITION');
?>
				</td>
				<td>
					<?php 
echo select_edit_control('NEW_SURNAME_TRADITION', array('paternal' => WT_I18N::translate_c('Surname tradition', 'paternal'), 'patrilineal' => WT_I18N::translate('patrilineal'), 'matrilineal' => WT_I18N::translate('matrilineal'), 'spanish' => WT_I18N::translate_c('Surname tradition', 'Spanish'), 'portuguese' => WT_I18N::translate_c('Surname tradition', 'Portuguese'), 'icelandic' => WT_I18N::translate_c('Surname tradition', 'Icelandic'), 'polish' => WT_I18N::translate_c('Surname tradition', 'Polish'), 'lithuanian' => WT_I18N::translate_c('Surname tradition', 'Lithuanian'), 'none' => WT_I18N::translate_c('Surname tradition', 'none')), null, get_gedcom_setting(WT_GED_ID, 'SURNAME_TRADITION'));
?>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
echo WT_I18N::translate('Use full source citations'), help_link('FULL_SOURCES');
?>
				</td>
				<td>
					<?php 
echo edit_field_yes_no('NEW_FULL_SOURCES', get_gedcom_setting(WT_GED_ID, 'FULL_SOURCES'));
?>
				</td>
			</tr>
开发者ID:jacoline,项目名称:webtrees,代码行数:31,代码来源:admin_trees_config.php

示例11: _centuryName

 private static function _centuryName($century)
 {
     if ($century < 0) {
         return str_replace(-$century, WT_Stats::_centuryName(-$century), WT_I18N::translate('%s BCE', WT_I18N::number(-$century)));
     }
     // The current chart engine (Google charts) can't handle <sup></sup> markup
     switch ($century) {
         case 21:
             return strip_tags(WT_I18N::translate_c('CENTURY', '21st'));
         case 20:
             return strip_tags(WT_I18N::translate_c('CENTURY', '20th'));
         case 19:
             return strip_tags(WT_I18N::translate_c('CENTURY', '19th'));
         case 18:
             return strip_tags(WT_I18N::translate_c('CENTURY', '18th'));
         case 17:
             return strip_tags(WT_I18N::translate_c('CENTURY', '17th'));
         case 16:
             return strip_tags(WT_I18N::translate_c('CENTURY', '16th'));
         case 15:
             return strip_tags(WT_I18N::translate_c('CENTURY', '15th'));
         case 14:
             return strip_tags(WT_I18N::translate_c('CENTURY', '14th'));
         case 13:
             return strip_tags(WT_I18N::translate_c('CENTURY', '13th'));
         case 12:
             return strip_tags(WT_I18N::translate_c('CENTURY', '12th'));
         case 11:
             return strip_tags(WT_I18N::translate_c('CENTURY', '11th'));
         case 10:
             return strip_tags(WT_I18N::translate_c('CENTURY', '10th'));
         case 9:
             return strip_tags(WT_I18N::translate_c('CENTURY', '9th'));
         case 8:
             return strip_tags(WT_I18N::translate_c('CENTURY', '8th'));
         case 7:
             return strip_tags(WT_I18N::translate_c('CENTURY', '7th'));
         case 6:
             return strip_tags(WT_I18N::translate_c('CENTURY', '6th'));
         case 5:
             return strip_tags(WT_I18N::translate_c('CENTURY', '5th'));
         case 4:
             return strip_tags(WT_I18N::translate_c('CENTURY', '4th'));
         case 3:
             return strip_tags(WT_I18N::translate_c('CENTURY', '3rd'));
         case 2:
             return strip_tags(WT_I18N::translate_c('CENTURY', '2nd'));
         case 1:
             return strip_tags(WT_I18N::translate_c('CENTURY', '1st'));
         default:
             return $century - 1 . '01-' . $century . '00';
     }
 }
开发者ID:sadr110,项目名称:webtrees,代码行数:53,代码来源:Stats.php

示例12: getLabel


//.........这里部分代码省略.........
             return WT_I18N::translate('Longitude');
         case 'MAP':
             return WT_I18N::translate('Map');
         case 'MARB':
             return WT_I18N::translate('Marriage banns');
         case 'MARB:DATE':
             return WT_I18N::translate('Date of marriage banns');
         case 'MARB:PLAC':
             return WT_I18N::translate('Place of marriage banns');
         case 'MARC':
             return WT_I18N::translate('Marriage contract');
         case 'MARL':
             return WT_I18N::translate('Marriage license');
         case 'MARR':
             return WT_I18N::translate('Marriage');
         case 'MARR:DATE':
             return WT_I18N::translate('Date of marriage');
         case 'MARR:PLAC':
             return WT_I18N::translate('Place of marriage');
         case 'MARR_CIVIL':
             return WT_I18N::translate('Civil marriage');
         case 'MARR_PARTNERS':
             return WT_I18N::translate('Registered partnership');
         case 'MARR_RELIGIOUS':
             return WT_I18N::translate('Religious marriage');
         case 'MARR_UNKNOWN':
             return WT_I18N::translate('Marriage type unknown');
         case 'MARS':
             return WT_I18N::translate('Marriage settlement');
         case 'MEDI':
             return WT_I18N::translate('Media type');
         case 'NAME':
             if ($record instanceof WT_Repository) {
                 return WT_I18N::translate_c('Repository', 'Name');
             } else {
                 return WT_I18N::translate('Name');
             }
         case 'NAME:FONE':
             return WT_I18N::translate('Phonetic name');
         case 'NAME:_HEB':
             return WT_I18N::translate('Name in Hebrew');
         case 'NATI':
             return WT_I18N::translate('Nationality');
         case 'NATU':
             return WT_I18N::translate('Naturalization');
         case 'NATU:DATE':
             return WT_I18N::translate('Date of naturalization');
         case 'NATU:PLAC':
             return WT_I18N::translate('Place of naturalization');
         case 'NCHI':
             return WT_I18N::translate('Number of children');
         case 'NICK':
             return WT_I18N::translate('Nickname');
         case 'NMR':
             return WT_I18N::translate('Number of marriages');
         case 'NOTE':
             return WT_I18N::translate('Note');
         case 'NPFX':
             return WT_I18N::translate('Name prefix');
         case 'NSFX':
             return WT_I18N::translate('Name suffix');
         case 'OBJE':
             return WT_I18N::translate('Media object');
         case 'OCCU':
             return WT_I18N::translate('Occupation');
         case 'OCCU:AGNC':
开发者ID:brambravo,项目名称:webtrees,代码行数:67,代码来源:Tag.php

示例13: getParents

 private function getParents($person)
 {
     global $SEARCH_SPIDER;
     $father = null;
     $mother = null;
     $html = sprintf(self::TTL, WT_I18N::translate('Parents'));
     $family = $person->getPrimaryChildFamily();
     if (!$SEARCH_SPIDER && $person->canShowName() && $family !== null) {
         $father = $family->getHusband($person);
         $mother = $family->getWife($person);
         $html .= $this->getHTML($father) . $this->getHTML($mother);
         // Can only have a step parent if one & only one parent found at this point
         if ($this->isPerson($father) xor $this->isPerson($mother)) {
             $stepParents = '';
             foreach ($person->getChildStepFamilies() as $family) {
                 if (!$this->isPerson($father)) {
                     $stepParents .= $this->getHTML($family->getHusband($person));
                 } else {
                     $stepParents .= $this->getHTML($family->getWife($person));
                 }
             }
             if ($stepParents) {
                 $relationship = $this->isPerson($father) ? WT_I18N::translate_c("father’s wife", "step-mother") : WT_I18N::translate_c("mother’s husband", "step-father");
                 $html .= sprintf(self::TTL, $relationship) . $stepParents;
             }
         }
     }
     if (!($this->isPerson($father) || $this->isPerson($mother))) {
         $html .= sprintf(self::MSG, WT_I18N::translate_c('unknown family', 'unknown'));
     }
     return $html;
 }
开发者ID:brambravo,项目名称:webtrees,代码行数:32,代码来源:module.php

示例14: getValue

 public static function getValue($type, $record = null)
 {
     if ($record instanceof WT_Individual) {
         $sex = $record->getSex();
     } else {
         $sex = 'U';
     }
     switch ($type) {
         case 'attendant':
             switch ($sex) {
                 case 'M':
                     return WT_I18N::translate_c('MALE', 'Attendant');
                 case 'F':
                     return WT_I18N::translate_c('FEMALE', 'Attendant');
                 default:
                     return WT_I18N::translate('Attendant');
             }
         case 'attending':
             switch ($sex) {
                 case 'M':
                     return WT_I18N::translate_c('MALE', 'Attending');
                 case 'F':
                     return WT_I18N::translate_c('FEMALE', 'Attending');
                 default:
                     return WT_I18N::translate('Attending');
             }
         case 'best_man':
             // always male
             return WT_I18N::translate('Best man');
         case 'bridesmaid':
             // always female
             return WT_I18N::translate('Bridesmaid');
         case 'buyer':
             switch ($sex) {
                 case 'M':
                     return WT_I18N::translate_c('MALE', 'Buyer');
                 case 'F':
                     return WT_I18N::translate_c('FEMALE', 'Buyer');
                 default:
                     return WT_I18N::translate('Buyer');
             }
         case 'circumciser':
             // always male
             return WT_I18N::translate('Circumciser');
         case 'civil_registrar':
             switch ($sex) {
                 case 'M':
                     return WT_I18N::translate_c('MALE', 'Civil registrar');
                 case 'F':
                     return WT_I18N::translate_c('FEMALE', 'Civil registrar');
                 default:
                     return WT_I18N::translate('Civil registrar');
             }
         case 'employee':
             switch ($sex) {
                 case 'M':
                     return WT_I18N::translate_c('MALE', 'Employee');
                 case 'F':
                     return WT_I18N::translate_c('FEMALE', 'Employee');
                 default:
                     return WT_I18N::translate('Employee');
             }
         case 'employer':
             switch ($sex) {
                 case 'M':
                     return WT_I18N::translate_c('MALE', 'Employer');
                 case 'F':
                     return WT_I18N::translate_c('FEMALE', 'Employer');
                 default:
                     return WT_I18N::translate('Employer');
             }
         case 'foster_child':
             // no sex implied
             return WT_I18N::translate('Foster child');
         case 'foster_father':
             // always male
             return WT_I18N::translate('Foster father');
         case 'foster_mother':
             // always female
             return WT_I18N::translate('Foster mother');
         case 'friend':
             switch ($sex) {
                 case 'M':
                     return WT_I18N::translate_c('MALE', 'Friend');
                 case 'F':
                     return WT_I18N::translate_c('FEMALE', 'Friend');
                 default:
                     return WT_I18N::translate('Friend');
             }
         case 'godfather':
             // always male
             return WT_I18N::translate('Godfather');
         case 'godmother':
             // always female
             return WT_I18N::translate('Godmother');
         case 'godparent':
             // no sex implied
             return WT_I18N::translate('Godparent');
         case 'godson':
             // always male
//.........这里部分代码省略.........
开发者ID:brambravo,项目名称:webtrees,代码行数:101,代码来源:Rela.php

示例15: getAbbreviation

 private static function getAbbreviation($tag)
 {
     switch ($tag) {
         case 'BIRT':
             return WT_I18N::translate_c('Abbreviation for birth', 'b.');
         case 'MARR':
             return WT_I18N::translate_c('Abbreviation for marriage', 'm.');
         case 'DEAT':
             return WT_I18N::translate_c('Abbreviation for death', 'd.');
         default:
             return mb_substr(WT_Gedcom_Tag::getLabel($tag), 0, 1);
             // Just use the first letter of the full fact
     }
 }
开发者ID:jacoline,项目名称:webtrees,代码行数:14,代码来源:Lifespan.php


注:本文中的WT_I18N::translate_c方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。