Menu

Change iTop portal language

2025-01-21
2025-04-15
  • Adam Berndt

    Adam Berndt - 2025-01-21

    Hello everyone.

    Im fairly new to iTop and trying to set it up for my company as a ticket system.
    It can be abit overwhelming and I have tried to set the "end-user" portal in a different language. I've managed to translate the dictionary files from english to swedish myself in these directories:

    /var/www/html/datamodels/2.x/itop-portal/dictionaries/sv.dict.itop-portal.php
    AND
    /var/www/html/datamodels/2.x/itop-portal-base/dictionaries/sv.dict.itop-portal-base.php.

    Also changed the user in the admin controlpanel to use the new Swedish language. But still the portal is in english. I would appreciate all the help I can get because if I cant get this to work we wont use iTop, and I think iTop is the best system for our needs.

    I will answer if you have questions to be able to easier understand what Im trying to describe. Thank you.

     

    Last edit: Adam Berndt 2025-01-21
  • jf-cbd

    jf-cbd - 2025-01-21

    Hello,

    After adding the dictionary files, did you run a setup ? (https://your_itop_url.com/setup)
    It's necessary when editing translations. After this, you should see the new Swedish language.

    By the way, editing the dictionaries this way may cause to a lost of code when you'll perform next upgrade ; we would be very happy to receive a contribution from your part with the Swedish language 😉

     
  • Adam Berndt

    Adam Berndt - 2025-01-21

    Yes I did the setup but without any success. As I said im new to this and got other problems while I was trying stuff out so it ended I wiped my VM and started over from a backup. I can ofc contribute with the swedish dictionary. Will do it soon :)

     
    ❤️
    1

    Last edit: Adam Berndt 2025-01-21
    • jf-cbd

      jf-cbd - 2025-01-21

      Okay, does it work better now after your backup and restore ?

       
      • Adam Berndt

        Adam Berndt - 2025-01-21

        I've put the pull request on github now.

        No sadly not. I've made some mistake I suppose. but I've taken the iTop/datamodels/2.x/itop-portal/dictionaries/en.dict.itop-portal.php, copied it and renamed it to sv.dict.itop-portal.php and translated it. Did the setup again but still no luck.

        Is there anything im missing? Another dictionary file Im supposed to change, Im out of ideas sadly.

         
        • jf-cbd

          jf-cbd - 2025-01-22

          Thanks for the answer. I don't see your pull request, are you sure you submitted it ?

          I did the test by reproducing what you're describing, and I'm able to change the language in the portal user setting.

          But for your information :
          * there is no default language value for the portal (nor for the console), iTop will be displayed in the current user language
          * If you created a Swedish dictionary file as you described, then it should be an allowed value that can be used at user creation (e.g. by an admin) or by the user itself
          * default_language in the iTop configuration file will be used when the user isn't logged in (e.g. login page)

           
  • Adam Berndt

    Adam Berndt - 2025-01-22

    Yes I made the pull request. https://github.com/adamberndt47/iTop/
    datamodels/2.x/itop-portal/dictionary & itop-portal-base/dictionary
    AND
    iTop/tree/develop/dictionaries

    4 total files. Maybe I did something wrong? First time leaving a pull request ^^.

    I mixed up the wrong country codes at first. Reviewed the files and corrected them and now it works, hehe :)

     
    • jf-cbd

      jf-cbd - 2025-01-22

      Thanks for that :)

      You did the first step of the Pull Request (PR): create a fork from our repository. The second step is to create the PR, you should be able to do it from here : https://github.com/Combodo/iTop/compare/develop...adamberndt47:iTop:develop

      Then I think the ISO country code of Sweden is SE and not SV, so the dictionaries files should start with

      Dict::Add('SV SE', 'Swedish', 'Svenska', array(
      

      and not

      Dict::Add('SV SV', 'Swedish', 'Svenska', array(
      

      All dictionaries files should also start by the same string, in your case "sv_se.dict...."

      Could you please make the correction and submit your PR ?

      Thanks a lot :)

       

      Last edit: jf-cbd 2025-01-22
  • jf-cbd

    jf-cbd - 2025-02-07

    @adamberndt if you need help feel free to ask ;)

     
  • Niclas Eriksson

    Niclas Eriksson - 2025-04-15

    I'm also trying to translate to Swedish for the end user portal, and have come quite far, but I don't find where these fields are taken from (attached)? Does anyone know in which file those are listed? I've tried searching for the strings under the datamodels folder on all English php files but can't find them.

     
  • Niclas Eriksson

    Niclas Eriksson - 2025-04-15

    Now I found it, it's under the itop root folder /var/www/html/itop/dictionaries and named en.dictionary.itop.ui.php.
    It seems that some elements in the customer portal are handled from that file.
    ven using chapgpt
    That file is REALLY large though so it will take a while to translate.. :)

     

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.