2014-11-26 20:18:59 +00:00
|
|
|
<?php
|
|
|
|
/* @var $this SiteController */
|
|
|
|
|
|
|
|
$this->pageTitle=Yii::t('app', Yii::app()->name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
<p>
|
2014-12-09 12:30:16 +00:00
|
|
|
<?php
|
|
|
|
|
2015-01-20 20:48:23 +00:00
|
|
|
$wordType = $data["type"];
|
2014-12-09 12:30:16 +00:00
|
|
|
|
2015-01-20 20:48:23 +00:00
|
|
|
$modificatorsData = null;
|
2014-12-09 12:30:16 +00:00
|
|
|
$adjectiveData = null;
|
|
|
|
if ($wordType === "noun")
|
|
|
|
{
|
2015-01-20 20:48:23 +00:00
|
|
|
$modificatorsData = $data["modificators"];
|
|
|
|
echo str_replace('{nominative}', $data["word"], Yii::t('dict', 'Most likely, original word is <b>{nominative}</b><BR>'));
|
2014-12-09 12:30:16 +00:00
|
|
|
echo Yii::t('dict', "This is noun") . "<BR>";
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($wordType === "adjective")
|
|
|
|
{
|
|
|
|
$adjectiveData = $data["adjective"];
|
2015-01-20 20:48:23 +00:00
|
|
|
echo str_replace('{nominative}', $data["word"], Yii::t('dict', 'Most likely, original word is <b>{nominative}</b><BR>'));
|
2014-12-09 12:30:16 +00:00
|
|
|
echo Yii::t('dict', "This is adjective") . "<BR>";
|
|
|
|
}
|
|
|
|
?>
|
2014-11-26 20:18:59 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2014-12-01 07:22:08 +00:00
|
|
|
<?php
|
2014-11-26 20:18:59 +00:00
|
|
|
|
2014-12-09 12:30:16 +00:00
|
|
|
if ($wordType === "noun")
|
|
|
|
{
|
2014-12-01 07:22:08 +00:00
|
|
|
$animateSuffix = "";
|
2015-01-20 20:48:23 +00:00
|
|
|
if ($modificatorsData["animated"] === "true")
|
2014-12-01 07:22:08 +00:00
|
|
|
{
|
|
|
|
$animateSuffix = "ANIMATE";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$animateSuffix = "INANIMATE";
|
|
|
|
}
|
|
|
|
|
|
|
|
$genderSuffix = "";
|
2015-01-20 20:48:23 +00:00
|
|
|
if ($modificatorsData["count"] === "NC_SINGULAR")
|
2014-12-01 07:22:08 +00:00
|
|
|
{
|
2015-01-20 20:48:23 +00:00
|
|
|
if ($modificatorsData["gender"] === "0")
|
2014-12-01 07:22:08 +00:00
|
|
|
{
|
|
|
|
$genderSuffix = "_MALE";
|
|
|
|
}
|
2015-01-20 20:48:23 +00:00
|
|
|
else if ($modificatorsData["gender"] === "1")
|
2014-12-01 07:22:08 +00:00
|
|
|
{
|
|
|
|
$genderSuffix = "_FEMALE";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$genderSuffix = "_NEUTER";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-20 20:48:23 +00:00
|
|
|
if ($modificatorsData["grammaticalCase"] === "NGC_P4_ACCUSATIVE")
|
2014-12-09 12:30:16 +00:00
|
|
|
{
|
2015-01-20 20:48:23 +00:00
|
|
|
$combinedStr = $modificatorsData["grammaticalCase"] . "_" . $modificatorsData["count"] . "_" . $animateSuffix . $genderSuffix;
|
2014-12-09 12:30:16 +00:00
|
|
|
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
|
|
|
|
|
|
|
}
|
2015-01-20 20:48:23 +00:00
|
|
|
else if ($modificatorsData["grammaticalCase"] === "NGC_P1_NOMINATIVE")
|
2014-12-09 12:30:16 +00:00
|
|
|
{
|
2015-01-20 20:48:23 +00:00
|
|
|
$combinedStr = $modificatorsData["grammaticalCase"] . "_" . $modificatorsData["count"] . $genderSuffix;
|
2014-12-09 12:30:16 +00:00
|
|
|
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-01-20 20:48:23 +00:00
|
|
|
$combinedStr = $modificatorsData["grammaticalCase"] . "_" . $modificatorsData["count"] . $genderSuffix;
|
2014-12-09 12:30:16 +00:00
|
|
|
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")
|
2014-12-01 07:22:08 +00:00
|
|
|
{
|
2014-12-09 12:30:16 +00:00
|
|
|
$combinedStr = $adjectiveData["grammaticalCase"] . "_" . $adjectiveData["count"] . "_" . $animateSuffix . $genderSuffix;
|
2014-12-01 07:22:08 +00:00
|
|
|
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
|
|
|
|
|
|
|
}
|
2014-12-09 12:30:16 +00:00
|
|
|
else if ($adjectiveData["grammaticalCase"] === "NGC_P1_NOMINATIVE")
|
2014-12-01 07:22:08 +00:00
|
|
|
{
|
2014-12-09 12:30:16 +00:00
|
|
|
$combinedStr = $adjectiveData["grammaticalCase"] . "_" . $adjectiveData["count"] . $genderSuffix;
|
2014-12-01 07:22:08 +00:00
|
|
|
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-12-09 12:30:16 +00:00
|
|
|
$combinedStr = $adjectiveData["grammaticalCase"] . "_" . $adjectiveData["count"] . $genderSuffix;
|
2014-12-01 07:22:08 +00:00
|
|
|
echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "<BR>";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
echo Yii::t('dict', $animateSuffix) . "<BR>";
|
|
|
|
|
2014-12-09 12:30:16 +00:00
|
|
|
echo Yii::t('dict', $genderSuffix) . "<BR>";
|
|
|
|
|
|
|
|
}
|
2014-12-01 07:22:08 +00:00
|
|
|
?>
|
2014-11-26 20:18:59 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-09 12:30:16 +00:00
|
|
|
|