Language arrays called in HTML

Discussion forum for MOD Writers regarding MOD Development.
Locked
User avatar
oxfordsi
Registered User
Posts: 266
Joined: Sun Jan 06, 2008 10:06 pm
Location: Witney, Oxfordshire, UK

Language arrays called in HTML

Post by oxfordsi »

Hello,

I was wondering if someone could detail how phpbb calls the language array in the common.php script from within an html page without using php include_once to call the file from within the html script?

Hope this makes sense! :D

Simon

Comkid
Registered User
Posts: 132
Joined: Thu Mar 25, 2010 5:40 am

Re: Language arrays called in HTML

Post by Comkid »

Language arrays are called with

Code: Select all

{L_X}
Replace X with the name of the language array

An example would be:

Code: Select all

{L_MCP}
Which calls for what MCP means in the language array which changes to Moderator Control Panel in the HTML after processing ;)
I ist Comkid :P

User avatar
oxfordsi
Registered User
Posts: 266
Joined: Sun Jan 06, 2008 10:06 pm
Location: Witney, Oxfordshire, UK

Re: Language arrays called in HTML

Post by oxfordsi »

I'm struggling to understand though how the HTML script knows to call the language file. Surely the HTML would just print {L_X}?!

Apologies for the 'dumbness' that I may be presenting!

Comkid
Registered User
Posts: 132
Joined: Thu Mar 25, 2010 5:40 am

Re: Language arrays called in HTML

Post by Comkid »

Look, when you use phpBB, it doesn't show:

Code: Select all

http://example.com/phpBB3/styles/prosilver/viewtopic_body.html
To show a topic, but it uses:

Code: Select all

http://example.com/phpBB3/viewtopic.php
Which automatically parses the HTML ;)

But the code that parses the HTML, is on includes/functions_template.php ;)
I ist Comkid :P

Locked

Return to “[3.0.x] MOD Writers Discussion”