Skip to content

Instantly share code, notes, and snippets.

@cip123
Created November 15, 2017 06:27
Show Gist options
  • Save cip123/26cc7a60caec8b437df8e3f7793dfd9d to your computer and use it in GitHub Desktop.
Save cip123/26cc7a60caec8b437df8e3f7793dfd9d to your computer and use it in GitHub Desktop.
<?php
/**
* Created by PhpStorm.
* User: cip
* Date: 11/7/17
* Time: 11:23 PM
*/
namespace patients\risk;
class RiskFactor
{
public static function getNcuuValues()
{
return array (
'no' => __('no'),
'controlled' => __('yes') . ", " . __("risk_factors.controlled"),
'uncontrolled' => __('yes') . ", " . __("risk_factors.uncontrolled"),
'untreated' => __('yes') . ", " . __("risk_factors.untreated")
);
}
}
<?php
$translation = array(
'yes' => 'Da',
'no' => 'Nu',
'risk_factors.untreated' => 'netratată',
'risk_factors.controlled' => 'controlată medicamentos',
'risk_factors.uncontrolled' => 'necontrolată medicamentos'
);
function __($token) {
global $translation;
if (!array_key_exists($token, $translation))
{
return $token;
} else {
return $translation[$token];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment