General developer forum

Which module does include texts ?

Picture of Jesse Hirata
Which module does include texts ?

I just begin to join moodle developer community, and am trying to grasp a full picture of module components of module. However, I do not find any module that include texts, so I guess that database has it ?! I would like to make sure if Im successfully debugging or not. 

Would anyone please tell me how texts ouput on the view ?

For example, there were two texts that I tried to change like the below pic shows;

Average of ratings: -
Mary Cooch
Re: Which module does include texts ?
Group Documentation writersGroup Moodle Course Creator Certificate holdersGroup Moodle HQGroup Particularly helpful MoodlersGroup TestersGroup Translators

Hello. I'm not a developer so am not quite sure if this is the reply  you are looking for, but if you want to change texts or words in Moodle then you can do this within the Moodle admin interface. See the documentation Language customisation for how to do this. Also, if you are interested in these changes in general then the documentation on Language has more information.

Average of ratings: -
Picture of Jesse Hirata
Re: Which module does include texts ?

Thank you for your reply. 

Actually, I already know how to change texts on the admin page, but I am not sure of how to change texts by fixing directly the code or changing records in database. 

I guess that the common way to change texts is like the below;


Changing words or phrases

Words or phrases (in any language) used on the site may be easily changed by an administrator using the language customisation feature. For example, you may want to change the word "Course" to "Unit".

Go to Site administration > Language > Language customisation and choose the language you wish to customise.

Click the "Open language pack for editing" button. (This may take some time to process.)

Once the language pack has loaded, click the "Continue" button.

Find the string you wish to customise using the filter settings, then clicking "Show strings". See below for details of how to find the component and string identifier.

Make your changes in the "Local customisation" box.

Click "Apply changes and continue editing" if you want to use another filter or edit other file(s), otherwise click "Save changes to the language pack" to save all of the changes you have made.

Finding the component and string identifier

File:Show origin of lang strings.png

Lang string origins

Go to Site administration > Development > Debugging.

Tick the 'Show origin of languages strings' tickbox then save changes.

Go to the page containing the string you want to customise and in the address bar, append the following to the URL: either ?strings=1 or &strings=1 (depending whether there is already a parameter).

Reload the page.

The page will then be displayed with component and string identifies in curly brackets after each string, for example "{rememberusername/admin}". The first part, before the /, is the string identifier. The last part is the component e.g admin.php. If there is nothing after the / then the string is in moodle.php.


I am just curious of how we can directly change 'language pack' not handling settings on admin page.  

Anyway, thank you very much for your reply. 

I hope that other people also have an interest in the question because the community in other language also had the same question, but nobody answered. 

Average of ratings: -
Picture of Richard Oelmann
Re: Which module does include texts ?
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

The language strings aren't directly in the database (although language string changes done through the UI may be, I'm not sure about that)

Language strings are generally in language files - and you don't really want to change those in code, unless it's in your own plugin - as they would get overwritten on any upgrade.

The English language pack itself is part of the core code /lang/en

Downloaded language packs are in your moodledata/lang folder

If your changes are improvements to translations, its probably best to submit them to the language/translations part of the community through that forum and its FAQs/Guides

If they are site specific, the I really would recommend the UI route, unless its for your own plugin being developed. That avoids issues on upgrades.


Average of ratings: -
Picture of Jesse Hirata
Re: Which module does include texts ?
Thank you for your response.

I understood module structure of Moodle, I guess...

UI part is relatively separated with logic, isn't it ?  

Average of ratings: -