How to remove languages from the first screen of Ubiquity?

I'm using Cubic program (Custom Ubuntu ISO Creator) to make a custom version of Xubuntu (xubuntu-20.04.1-desktop-amd64.iso). On the first screen of Ubiquity we have a listing with many languages to choose from. I want to remove all languages and leave only English and Brazilian Portuguese as available choices. Is there any way to do this? Is it possible to pre-select the Brazilian Portuguese language on this screen to facilitate the installation? I'm a bit of a layman on the subject. (I'm using Google Translate)

enter image description here


Solution 1:

To list only English and Portuguese (Brazilian) in the Ubiquity language chooser, follow these steps.

  1. Open a text editor on your host computer, and enter the following information:

    0:en:English:English
    1:pt:Portuguese:Português
    1:pt_BR:Portuguese (Brazil):Português do Brasil.
    
  2. Save the file as languagelist.data.

  3. Open a terminal on your host computer.

    cd to the location where you saved this file, and execute the following command:

    gzip languagelist.data
    

    This will create a new file called languagelist.data.gz.

  4. In Cubic, navigate to the Terminal page.

    Execute the following to cd to the correct directory:

    cd /usr/lib/ubiquity/localechooser
    
  5. Then drag the new languagelist.data.gz file onto the Cubic Terminal page to copy it into this directory, overwriting the existing file.

  6. Finally, generate your customized ISO. When you start Ubiquity, you will only see English and Portuguese as the language options.


To set Portuguese as the default selected language in Ubiquity, follow these steps.

  1. In Cubic, navigate to the Options page.

  2. Click on the Preseed tab in the headerbar.

  3. Select the file xubuntu.seed in the left pane.

  4. In the right pane, paste the following at the end of the file.

    # Set language, country and locale.
    d-i debian-installer/language string pt
    d-i debian-installer/country string BR
    d-i debian-installer/locale string pt_BR.UTF-8
    
  5. Finally, generate your customized ISO. When you start Ubiquity, you will see that Portuguese is selected by default in the language options list.