We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28215
    • 4,149 Posts
    Hey guys,

    So we’ve made a translation tool 3PC for translating MODx Revolution, and it’s called Language Builder:

    http://modxcms.com/extras/package/?package=546

    You can either download it from that URL and upload it manually, or (even easier) download it straight from MODx Revolution’s Package Management, by:

    - Click ’Add New Package’
    - Select modxcms.com
    - Open up the ’Core Extensions’ category in the tree, then ’Internationalization’, then Language Builder -> 1.0-beta

    The package will download to your workspace. Then just right-click on it, and click ’Install’, and viola! Clear your cache, then use:

    - Components -> Language Builder

    and the rest is simple.

    Let us know how this thing works for you all. All you need to do is select the language you’re translating to (if you haven’t created it already in Lexicon Management, you’ll need to), the version of your translation, and then the namespace you want to translate (core = the Revolution manager + setup strings).

    The tool will also tell you what strings you haven’t yet translated.
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • 23703
      • 180 Posts
      This looks to be a great tool, Shaun! Very much appreciated.

      A few issues though

      • Installing works lika charm. However - when I go to the Languagebuilder the page is emty of language since I run the manager in swedish. If there is a fallback to english its not working properly.
      • When i select swedish and the core namespace I get a very long list of missing entries. I haven’t counted how many language strings there are in the core namespace, but it seems the list of missing entries (1865 in total) might contain all of the keys. I know for a fact that no strings are missing since I use a language checking tool of my own. The alleged missing keys are also present in the created package, so something isn’t quite right.
      • The message "You are missing the following entries from your translation:" is hardcoded.

      I translated the language file for Languagebuilder. Do you want it uploaded as a regular package or do I post it here?
        • 28215
        • 4,149 Posts
        Quote from: Pont at Jun 11, 2009, 04:04 AM

        A few issues though

        • Installing works lika charm. However - when I go to the Languagebuilder the page is emty of language since I run the manager in swedish. If there is a fallback to english its not working properly.
        • When i select swedish and the core namespace I get a very long list of missing entries. I haven’t counted how many language strings there are in the core namespace, but it seems the list of missing entries (1865 in total) might contain all of the keys. I know for a fact that no strings are missing since I use a language checking tool of my own. The alleged missing keys are also present in the created package, so something isn’t quite right.
        • The message "You are missing the following entries from your translation:" is hardcoded.

        I translated the language file for Languagebuilder. Do you want it uploaded as a regular package or do I post it here?

        Pont,

        Thanks for testing it out; I figured we’d run into some bugs. A couple q’s:

        I definitely need translations of the English strings in language builder. If it’s not falling back to English, that’s definitely a bug. I’ll look into it. As for the hardcoded strings, I’ll go ahead and make them lexicon strings now, and here are the keys so you can translate them:

        $_lang['languagebuilder.no_setup_files'] = 'You have not created the setup language files. Please do so first.';
        $_lang['languagebuilder.manager'] = 'Manager';
        $_lang['languagebuilder.setup'] = 'Setup';
        $_lang['languagebuilder.missing_entries'] = 'You are missing the following entries from your translation:';
        $_lang['languagebuilder.translation_complete'] = 'Your language translation is complete.';
        


        After you’re through adding those strings, you can post it here or email it to me ([email protected]). I’ll get it in there asap. Thanks!
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 28215
          • 4,149 Posts
          I’ve posted a fixed version to the repository:

          http://modxcms.com/extras/package/?package=546

          This should fix the issues you were reporting, as well as includes lexicon entries for the hardcoded strings.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 23703
            • 180 Posts
            Works wonderfully now except for the fallback to english that still doesn’t happen. During the installation of the package I got the following message:
            Konsollen körs...
            Försöker installera paketet med signaturen: languagebuilder-1.0-beta2
            Paketet hittades... nu förbereds installationen.
            Grabbing package workspace...
            Workspace environment initiated, now installing package...
            Language string not found: "new_document"
            Language string not found: "support_desc"
            modManagerLog: Attempt to set NOT NULL field item to NULL
            Paketet languagebuilder-1.0-beta2 installerades


            Is it no longer possible to attach files to posts? I’ll mail the swedish file to you.
              • 28215
              • 4,149 Posts
              Quote from: Pont at Jun 11, 2009, 01:31 PM

              Works wonderfully now except for the fallback to english that still doesn’t happen. During the installation of the package I got the following message:
              Konsollen körs...
              Försöker installera paketet med signaturen: languagebuilder-1.0-beta2
              Paketet hittades... nu förbereds installationen.
              Grabbing package workspace...
              Workspace environment initiated, now installing package...
              Language string not found: "new_document"
              Language string not found: "support_desc"
              modManagerLog: Attempt to set NOT NULL field item to NULL
              Paketet languagebuilder-1.0-beta2 installerades

              That all looks good - the lang string not found is a Revolution 2.0-beta-1 bug, and so is the NOT NULL line.


              Is it no longer possible to attach files to posts? I’ll mail the swedish file to you.
              No, it’s not. We disabled that because there’s an active exploit for SMF dealing with attachments, that’s still unfixed at this point.
                shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                • 28215
                • 4,149 Posts
                FYI to International community,

                If anyone has translations of Language Builder’s lexicon, feel free to send them to me ([email protected]), and I’ll add them to SVN. The SVN can be viewed here:

                http://svn.modxcms.com/svn/modx-components/languagebuilder/

                Once I get a few more translations in, I’ll upload a new version of LB to the modxcms.com repository so we can get this live.

                Thanks for your help,
                Shaun
                  shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                  • 6726
                  • 7,075 Posts
                  As I have said on twitter kudos for this !

                  Sadly I did not have time to test this or make progress on Revo’s french translation... I’ll report as soon as I test this, once I am done with my current problem setting up a streaming server with ffmpeg’s ffserver (sigh)
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l'outil id
                    • 8643
                    • 271 Posts
                    Hi, I made package (languagebuilder beta2) and Install package on fresh installation Revolution.

                    It sets empty "name" in table lexicon_languages and empty "language" in table lexicon_entries.
                      • 8898
                      • 181 Posts
                      Quote from: elastic at Jun 25, 2009, 03:38 PM

                      Hi, I made package (languagebuilder beta2) and Install package on fresh installation Revolution.

                      It sets empty "name" in table lexicon_languages and empty "language" in table lexicon_entries.
                      I experienced the same. I used the most recent version of Revolution (RC1, rev6351), created a transport package on my local Windows system, and installed it using a Revo installation on a webserver. Then I had to manually change the language name in the database table <prefix>_lexicon_languages and in all new lexicon entries in <prefix>_lexicon_entries from "" to "de" because my translation wasn’t usable without this modification.

                      The entries in the zip file (lexicon.core.200rc1.de-1.0.0-alpha-1.zip, path /lexicon.core.200rc1.de-1.0.0-alpha-1/modLexiconLanguage/9a8f6d6732ba4dcae13ce5ddbfc46900.vehicle) seem to be correct:
                      <?php return array (
                        'preserve_keys' => false,
                        'update_object' => true,
                        'unique_key' => 'name',
                        'related_objects' => 
                        array (
                          'Entries' => 
                          array (
                            '760718de95a56179a45b3555d7765a6d' => 
                            array (
                              'preserve_keys' => false,
                              'update_object' => true,
                              'unique_key' => 
                              array (
                                0 => 'name',
                                1 => 'topic',
                                2 => 'namespace',
                                3 => 'language',
                              ),
                              'class' => 'modLexiconEntry',
                              'object' => '{"id":2511,"name":"credits","value":"Danksagungen","topic":1,"namespace":"core","language":"de","createdon":"2010-02-11 21:54:02","editedon":"0000-00-00 00:00:00"}',
                              'guid' => '7ad1ddd7c4eced1c53a07755edeedc2f',
                              'native_key' => 2511,
                              'signature' => 'ca66e6b7ff44a3b992416d3160dadb47',
                            ),
                      
                            [...]
                      
                          ),
                        ),
                        'related_object_attributes' => 
                        array (
                          'modLexiconEntry' => 
                          array (
                            'preserve_keys' => false,
                            'update_object' => true,
                            'unique_key' => 
                            array (
                              0 => 'name',
                              1 => 'topic',
                              2 => 'namespace',
                              3 => 'language',
                            ),
                          ),
                        ),
                        'resolve' => 
                        array (
                          0 => 
                          array (
                            'type' => 'file',
                            'body' => '{"source":"lexicon.core.200rc1.de-1.0.0-alpha-1\\/modLexiconLanguage\\/9a8f6d6732ba4dcae13ce5ddbfc46900\\/0\\/","target":"return MODX_BASE_PATH . \'setup\\/lang\\/\';","name":"de"}',
                          ),
                        ),
                        'validate' => NULL,
                        'vehicle_package' => 'transport',
                        'vehicle_class' => 'xPDOObjectVehicle',
                        'guid' => 'dc664555147e7b9cecee8a309629acfb',
                        'package' => 'modx',
                        'class' => 'modLexiconLanguage',
                        'signature' => '9a8f6d6732ba4dcae13ce5ddbfc46900',
                        'native_key' => 'de',
                        'object' => '{"name":"de"}',
                      );

                      At least the language name does occur in the entry arrays and at the end of the file.

                      I attached the lexicon transport package to this posting - maybe you’d like to take a look at it.

                      Cheers,
                      Jan
                        This message has been ROT-13 encrypted twice for higher security.