We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50595
    • 32 Posts
    Hi Bruno17

    Quote from: Bruno17 at Nov 03, 2015, 05:30 AM
    did you create a namespace?

    Yes, I did. See attachments.

    Greetings

    Ralph
      • 50595
      • 32 Posts
      Hi Bruno17

      I can access «test» in my template if I define key/value in Lexicon-Management UI in manager. But this key/value isn't stored in those files I created in core/components/i18n/.

      Greetings

      Ralph
        • 13428 ☆ A M B ☆
        • 1,031 Posts
        But this key/value isn't stored in those files I created in core/components/i18n/.

        You have to edit the files and clear the cache after that. The lexicon table is only overwriting the values in the files (and adds new key/value pairs).
          • 50595
          • 32 Posts
          Hi Jako

          Quote from: Jako at Nov 03, 2015, 06:25 AM
          You have to edit the files and clear the cache after that. The lexicon table is only overwriting the values in the files (and adds new key/value pairs).

          I just tried this minutes ago. But the key/value pairs that I wrote down in the files doesn't show up in the UI table in manager at all. The folders and files in path core/components/i18n/de/ and core/component/i18n/en/ are chmod 777 and fully accessible. Maybe my syntax is wrong?

          <?php
          	
          	$lang['c_Firstname'] = 'Firstname';
          	$lang['c_Lastname'] = 'Lastname';
          	$lang['c_City'] = 'City';
          


          Greetings

          Ralph
            • 50595
            • 32 Posts
            Hi there

            I just deleted all the tabs in front of each line in both php files. Now the lines showing up in the table. Maybe that was the issue.
            But now everything is working fine.

            Thank you very much guys!

            Greetings

            Ralph
              • 13428 ☆ A M B ☆
              • 1,031 Posts
              The spaces in the displayed code above are non breaking spaces, that could be the issue. They have to be normal spaces to work in php.
                • 50595
                • 32 Posts
                Hi Jako

                Quote from: Jako at Nov 03, 2015, 07:20 AM
                The spaces in the displayed code above are non breaking spaces, that could be the issue. They have to be normal spaces to work in php.

                How did you see this? I just tried to setup a new lexicon on a new MODx instance. Now I have the same issue. If I create the file remotely (I work with Coda 2.5) I can't access the lexicon entries. Only if I copy a default.inc.php from another comonents lexicon it works properly.

                I also checked the encoding of the line end (CF) and the encoding of the text itself. Couldn't find any difference. Any advice?

                Greetings

                Ralph
                  • 13428 ☆ A M B ☆
                  • 1,031 Posts
                  The chars were shown different in PhpStorm (copied the code from Chrome to PhpStorm on a Mac). PhpStorm showed errors in the pasted lines.