Custom course fields as placeholder in language pack

Re: Custom course fields as placeholder in language pack

by John Provasnik -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Testers
Interesting question!

If you're looking to kind of create your own special message (instead of modifying an existing language string), consider if the Filter Codes plugin would work for what you're aiming to do. 

If you want a list of all placeholders available in your language pack, you can search for it (Site Admin - Language Customization) by selecting all possible strings and typing $a-> into the "only strings containing" field, then click Show strings. You get a list of maybe 18 pages where place holders are used.

However, place holders aren't necessarily able to be used in 'any' language string or outside of the "Language Customization" admin page -- I think they are specific to the particular language strings in which they were created for use in (but I'm not a developer, so I'm just guessing here). For example, I wanted to add a place holder into the daily forum email notices - This placeholder works fine in a different language string, but when I pasted it into one of the forum's language strings it unfortunately did not work there in that forum language string (the email just displayed the placeholder). I've never tried to use it elsewhere, such as in a course custom field.