get_string返回不正确的值


Moodle's get_string returns incorrect value

我正在创建一个moodle本地插件
我在local/myplugin/lang/en/local_usercertlist.php中创建了一个语言文件,其中包含一些键:
我在local/myplugin/lang/en/local_myplugin.php中创建了一个语言文件,其中包含一些关键字:

<?php
$string['pluginname']="My Plug-in";
$string['testkey']="Test Val";

lib.php中我这样使用get_string:

get_string('testkey','local_myplugin')

但我得到[[testkey]]而不是Test Val !

为什么?有什么问题吗?

我只需要增加插件版本&更新moodle数据库;

local/myplugin/lang/en/local_usercertlist.php

应该是

local/usercertlist/lang/en/local_usercertlist.php

get_string('testkey','local_myplugin')
应该

get_string('testkey','local_usercertlist')