public function translate($key, $data = null)
    {
        $rs = isset($this->data[$key]) ? $this->data[$key] : $key;
        if ($rs && !empty($data)) {
            $names = array_keys($data);
            $names = array_map(function($pkey){ return '{' . $pkey . '}'; }, $names);
            $rs = str_replace($names, array_values($data), $rs);
        }
        return $rs;
    }