152 lines
3.1 KiB
PHP
152 lines
3.1 KiB
PHP
<?php
|
|
/* @var $this SiteController */
|
|
|
|
$this->pageTitle=Yii::t('app', Yii::app()->name);
|
|
|
|
|
|
|
|
?>
|
|
|
|
<hr>
|
|
|
|
<p>
|
|
<?php
|
|
|
|
$wordType = $data["type"];
|
|
|
|
$modificatorsData = null;
|
|
$adjectiveData = null;
|
|
if ($wordType === "noun")
|
|
{
|
|
$modificatorsData = $data["modificators"];
|
|
echo str_replace('{nominative}', $data["word"], Yii::t('dict', 'Most likely, original word is <b>{nominative}</b><BR>'));
|
|
echo Yii::t('dict', "This is noun") . "<BR>";
|
|
}
|
|
|
|
if ($wordType === "adjective")
|
|
{
|
|
$adjectiveData = $data["adjective"];
|
|
echo str_replace('{nominative}', $data["word"], Yii::t('dict', 'Most likely, original word is <b>{nominative}</b><BR>'));
|
|
echo Yii::t('dict', "This is adjective") . "<BR>";
|
|
}
|
|
?>
|
|
</p>
|
|
|
|
<p>
|
|
<?php
|
|
|
|
if ($wordType === "noun")
|
|
{
|
|
$animateSuffix = "";
|
|
if ($modificatorsData["animated"] === "true")
|
|
{
|
|
$animateSuffix = "ANIMATE";
|
|
}
|
|
else
|
|
{
|
|
$animateSuffix = "INANIMATE";
|
|
}
|
|
|
|
$genderSuffix = "";
|
|
if ($modificatorsData["count"] === "NC_SINGULAR")
|
|
{
|
|
if ($modificatorsData["gender"] === "0")
|
|
{
|
|
$genderSuffix = "_MALE";
|
|
}
|
|
else if ($modificatorsData["gender"] === "1")
|
|
{
|
|
$genderSuffix = "_FEMALE";
|
|
}
|
|
else
|
|
{
|
|
$genderSuffix = "_NEUTER";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if ($modificatorsData["grammaticalCase"] === "NGC_P4_ACCUSATIVE")
|
|
{
|
|
$combinedStr = $modificatorsData["grammaticalCase"] . "_" . $modificatorsData["count"] . "_" . $animateSuffix . $genderSuffix;
|
|
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
|
|
|
}
|
|
else if ($modificatorsData["grammaticalCase"] === "NGC_P1_NOMINATIVE")
|
|
{
|
|
$combinedStr = $modificatorsData["grammaticalCase"] . "_" . $modificatorsData["count"] . $genderSuffix;
|
|
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
|
|
|
}
|
|
else
|
|
{
|
|
$combinedStr = $modificatorsData["grammaticalCase"] . "_" . $modificatorsData["count"] . $genderSuffix;
|
|
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
|
}
|
|
|
|
|
|
echo Yii::t('dict', $animateSuffix) . "<BR>";
|
|
|
|
}
|
|
|
|
if ($wordType === "adjective")
|
|
{
|
|
$animateSuffix = "";
|
|
if ($adjectiveData["animated"] === "true")
|
|
{
|
|
$animateSuffix = "ANIMATE";
|
|
}
|
|
else
|
|
{
|
|
$animateSuffix = "INANIMATE";
|
|
}
|
|
|
|
|
|
$genderSuffix = "";
|
|
if ($adjectiveData["count"] === "NC_SINGULAR")
|
|
{
|
|
if ($adjectiveData["gender"] === "0")
|
|
{
|
|
$genderSuffix = "_MALE";
|
|
}
|
|
else if ($adjectiveData["gender"] === "1")
|
|
{
|
|
$genderSuffix = "_FEMALE";
|
|
}
|
|
else
|
|
{
|
|
$genderSuffix = "_NEUTER";
|
|
}
|
|
}
|
|
|
|
if ($adjectiveData["grammaticalCase"] === "NGC_P4_ACCUSATIVE")
|
|
{
|
|
$combinedStr = $adjectiveData["grammaticalCase"] . "_" . $adjectiveData["count"] . "_" . $animateSuffix . $genderSuffix;
|
|
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
|
|
|
}
|
|
else if ($adjectiveData["grammaticalCase"] === "NGC_P1_NOMINATIVE")
|
|
{
|
|
$combinedStr = $adjectiveData["grammaticalCase"] . "_" . $adjectiveData["count"] . $genderSuffix;
|
|
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
|
|
|
}
|
|
else
|
|
{
|
|
$combinedStr = $adjectiveData["grammaticalCase"] . "_" . $adjectiveData["count"] . $genderSuffix;
|
|
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
|
}
|
|
|
|
|
|
echo Yii::t('dict', $animateSuffix) . "<BR>";
|
|
|
|
echo Yii::t('dict', $genderSuffix) . "<BR>";
|
|
|
|
}
|
|
?>
|
|
</p>
|
|
|
|
|
|
|
|
|