- Moodle 3.x Developer's Guide
- Ian Wild
- 135字
- 2021-07-02 21:34:41
String API
For a detailed explanation of the String API, visit https://docs.moodle.org/dev/String_API. The String API documentation reveals that the most effective method of having Moodle display two language strings on the screen at the same time is to author our own string manager, within which we have implemented a custom get_string() function. Luckily, the reporter of ticket MDL-49361 has already created an example, Moodle plugin moodle-local_stringman, and made it available through GitHub (refer to the preceding section, Source control discipline):

You will see that the README notes for the moodle-local_stringman plugin stress that the code provided should be used for illustration purposes only. So, we will need to download a copy of the source and create our own GitHub repository to work on:

That done, it's time to work on our solution.