Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

register_plugin_language()

Parameters

ColumnTypeDefaultDescription
$plugin

Location

include/plugin_functions.php lines 1399 to 1434

Definition

 
function register_plugin_language($plugin)
    {
    global 
$plugins,$language,$pagename,$lang,$applicationname,$customsitetext;
    
    
# Include language file
    
$langpath get_plugin_path($plugin) . "/languages/";

    if (
file_exists($langpath "en.php"))
        {
        include 
$langpath "en.php";
        }

    if (
$language != "en")
        {
        if (
            
substr($language21) == '-' 
            
&& substr($language02) != 'en'
            
&& file_exists($langpath safe_file_name(substr($language02)) .  ".php")
            ) {
                include 
$langpath safe_file_name(substr($language02)) . ".php";
            }
        if (
file_exists($langpath safe_file_name($language) . ".php"))
            {
            include 
$langpath safe_file_name($language) . ".php";
            }
        }

    
// If we have custom text created from Manage Content we need to reset this
    
if(isset($customsitetext))
        {
        foreach (
$customsitetext as $customsitetextname=>$customsitetextentry)
            {
            
$lang[$customsitetextname] = $customsitetextentry;
            }
        }
    }

This article was last updated 19th March 2024 09:35 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.