title: Typo3 Default language label and flag
body: <p>I'm working with Typo3 v6.1 and trying to set up multi-language site. The problem is that I can not change the default language label. What am I doing wrong?</p>
  
  <p>According to <a href="http://typo3.org/documentation/document-library/core-documentation/doc_l10nguide/1.0.0/view/1/2/" rel="nofollow">this</a> and <a href="http://www.typo3-blog.com/typo3-tipps/sprache-der-defaultlanguage-fuers-backend-festlegen/" rel="nofollow">this</a>, here is my TypoScript config </p>
  
  <pre><code>###################################################
  # language handling
  ###################################################
  
  mod.SHARED {
      defaultLanguageFlag = de
      defaultLanguageLabel = Deutsch
  }
  
  config {
      sys_language_uid = 0
      language = de
      locale_all = de_DE.UTF-8
      htmlTag_langKey = de_DE
  }
  
  [globalVar = GP:L = 1]
      config {
          sys_language_uid = 1
          language = en
          locale_all = en_GB.UTF-8
          htmlTag_langKey = en_GB
      }
  [end]
  </code></pre>
  
  <p>So language settings work and I can localize pages, but default language (uid = 0) is still displayed as Default and not Deutsch. I thought that maybe I'm using old settings and I tried debugging through Typo3 core, looks like these settings still in use in several places, here is one of them:</p>
  
  <pre><code>#/typo3/sysext/backend/Classes/Configuration/TranslationConfigurationProvider.php
  $languageIconTitles[0] = array(
      'uid' =&gt; 0,
      'title' =&gt; strlen($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'] . ' (' . $GLOBALS['LANG']-&gt;sl('LLL:EXT:lang/locallang_mod_web_list.xlf:defaultLanguage') . ')' : $GLOBALS['LANG']-&gt;sl('LLL:EXT:lang/locallang_mod_web_list.xlf:defaultLanguage'),
      'ISOcode' =&gt; 'DEF',
      'flagIcon' =&gt; strlen($modSharedTSconfig['properties']['defaultLanguageFlag']) ? 'flags-' . $modSharedTSconfig['properties']['defaultLanguageFlag'] : 'empty-empty'
  );
  </code></pre>
  
  <p>The problem is that Typo3 seems skipping load of my setting (though I do see them in Object browser).
  After that I tried also on older version of Typo3 - 4.7.12 and it didn't work out too ((( </p>
  
  <hr>
  
  <p><strong>UPDATE:</strong> According to <strong>biesior</strong>'s answer I need to add that code to PageTS config. That works for both Typo3 versions (4.* and 6.*) but also important to know <a href="http://docs.typo3.org/typo3cms/TSconfigReference/PageTsconfig/Field/Index.html" rel="nofollow">this concepts</a>. And there is a possibility to <a href="http://typo3.org/documentation/document-library/core-documentation/doc_core_tsconfig/4.0.0/view/1/3/" rel="nofollow">change the default</a> (i.e. global) PageTS config on behalf of extension:</p>
  
  <pre><code># /ext_localconf.php of your typo3 v6.* extension:
  \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
      'mod.SHARED {
          defaultLanguageFlag = de.gif
          defaultLanguageLabel = Deutsch
      }'
  );
  </code></pre>
  
  <p>or</p>
  
  <pre><code># /ext_localconf.php of your typo3 v4.* extension:
  t3lib_extMgm::addPageTSConfig(
      ...
  );
  </code></pre>