Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-15700

{T_THEME_LANG_NAME} template variable could be wrong when log off

    XMLWordPrintable

Details

    Description

      Consider a multilingual board: the default language of board is B (say, French) whereas the Anonymous language - aka the board preference of the user id 1 - is A (say, British English).

       

      When you are log off, the return value of {T_THEME_LANG_NAME} is en instead of fr, while the interface is in French (the default board language). Although you can override the language (both for {T_THEME_LANG_NAME} and the rest) by a cookie generated at the registration, it's definitely a bug.

       

      In includes/functions.php, we can see {T_THEME_LANG_NAME} only depends on the user's language (thus, it's the anonymous language when you are log off)

      'T_THEME_LANG_NAME'		=> $user->data['user_lang'],
      

      That template variable should work similarly to {T_STYLESHEET_LANG_LINK}, not affected by this issue

      'T_STYLESHEET_LANG_LINK'=> "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'],
      

      Therefore:

      'T_THEME_LANG_NAME'		=> $user->lang_name,
      

       

      Please note prosilver doesn't use {T_THEME_LANG_NAME} template variable. However, that possibly deprecated variable still exists and should be fixed as custom board styles could use it.

      Attachments

        Activity

          People

            Marc Marc
            Big Monstro Big Monstro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: