Menu

Localization - how to test locally

2025-02-16
2025-02-21
  • Huldar Örn Sigurðsson

    Hi
    I would like to attempt at creating a localization for my language. I have created the translated files, but I would like to test them out by creating a new user and selecting the new language for the user and then review the translations. I am testing this on my local Ubuntu VM. How do I do this?
    regards
    huldar

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2025-02-17

    "I have created the translated files" : Can you explain in detail what you've done already so far?

    Once the language is enabled in iTop; it should be as easy as just either setting the default iTop language (iTop configuration file) or in the specific user's preferences.

     
  • Huldar Örn Sigurðsson

    I have taken the en.dictionary.itop.core.php and en.dictionary.itop.ui.php and made a copy of them and then translated all of the translatable content in them. I also took some of the dictionary files from the datamodels/2.0 folder and did a similar translation. I then renamed the language file by changing the two first letters, replacing with the letters of the new language. But when I log into my iTop installation (Ubuntu, Apache2, Mariadb), and create a new user, my new language does not appair as one of the languages I can select.

     
    • Jeffrey Bostoen

      Jeffrey Bostoen - 2025-02-21

      I assume you also changed the language codes in the file as well?

      Not sure if it's needed - but try rerunning the iTop setup.

       
      • Huldar Örn Sigurðsson

        Yes I have changed the language codes inside the files. Here is for ex. the beginning of the file is.dictionary.itop.core.php from the /var/html/itop/dictionaries :

        <?php
        /**
         * Localized data
         *
         * @copyright Copyright (C) 2010-2024 Combodo SAS
         * @license    http://opensource.org/licenses/AGPL-3.0
         *
         * This file is part of iTop.
         *
         * iTop is free software; you can redistribute it and/or modify
         * it under the terms of the GNU Affero General Public License as published by
         * the Free Software Foundation, either version 3 of the License, or
         * (at your option) any later version.
         *
         * iTop is distributed in the hope that it will be useful,
         * but WITHOUT ANY WARRANTY; without even the implied warranty of
         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
         * GNU Affero General Public License for more details.
         *
         * You should have received a copy of the GNU Affero General Public License
         * along with iTop. If not, see <http://www.gnu.org/licenses/>
         */
        
        Dict::Add('IS IS', 'Icelandic', 'Icelandic', array(
            'Core:DeletedObjectLabel' => '%1s (eytt)',
            'Core:DeletedObjectTip' => 'Hlutnum hefur verið eytt þann %1$s (%2$s)',
        
            'Core:UnknownObjectLabel' => 'Hlutur fannst ekki (flokkur: %1$s, auðkenni: %2$d)',
        

        I will try re-running the install

         
  • Huldar Örn Sigurðsson

    So my question is about how iTop detects that there is a newly added language available for selection for newly created users? Is it something we configure in the database or is it dynamically detected somehow?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.