Portuguese language support for IvozProvider / Soporte para el idioma portugués en IvozProvider

31 views
Skip to first unread message

Juliano Targa

unread,
Apr 3, 2025, 3:10:43 PM4/3/25
to ivozprovider-users

Hello

My name is Juliano Targa, I’m from Brazil and I’m truly impressed with the IvozProvider project. I would love to contribute by helping add Portuguese language support to the system.

I’ve already started translating the interface and working on the frontend, compiling everything with Yarn. However, I’m struggling to understand how to adapt the translation to the new structure of the project, especially regarding the schema.

I found some older examples of the Italian translation on GitHub, but they seem outdated and not aligned with the current version of the system, which makes it harder to move forward.

Could you kindly guide me by pointing out which files and folders I should modify to properly include the Portuguese language?

Thank you in advance for your time. I’d be very happy to contribute to the community.

Best regards,
Juliano Targa

Kaian

unread,
Apr 4, 2025, 7:13:48 AM4/4/25
to ivozprovider-users

Hi Juliano,

Adding a new language involves several steps due to how poorly language support was initially implemented in IvozProvider (our fault!).

Here’s an overview of the tasks required to support a new language:

  • Add a new language entry to the Languages table (via a database migration).

  • Add a new column in all multilingual entities (also via a database migration).

    • Examples of multilingual entities include: Destinations, RatingPlanGroups, etc.

  • Add the corresponding Asterisk sound files for the new language (or reuse an existing language set if appropriate).

  • Define default notification contents for all email notification types (Voicemails, Faxes, Low Balance alerts, CSV reports, etc.).

  • And of course, provide translations for all translatable fields across the platform, including the brand, client, and user portals.

As you can see, it’s not a trivial task. However, we may introduce support for a new language in an upcoming 4.x release (exact timing still TBD), which you could use as a reference for implementing all the required changes.

Best regards,

Kaian

Juliano Targa

unread,
Apr 6, 2025, 8:27:09 AM4/6/25
to ivozprovider-users
Somethig goes wrong...
Gravação de Tela 2025-04-06 às 09.24.58.mov

Kaian

unread,
Apr 7, 2025, 7:23:41 AM4/7/25
to ivozprovider-users

Hi,

As I mentioned earlier, it's not an easy task.

For database changes, please follow these steps:

  1. Edit the ORM XML files for each table that uses multilang. For example:
    https://github.com/irontec/ivozprovider/blob/main/library/Ivoz/Provider/Infrastructure/Persistence/Doctrine/Mapping/Currency.Name.orm.xml

  2. Remove the cache directory:
    /opt/irontec/ivozprovider/schema/var/cache

  3. Generate a migration for the ORM changes by running:
    /opt/irontec/ivozprovider/schema/bin/console doctrine:migrations:diff

  4. Edit the generated migration file to set the new field values and add the necessary updates to the affected tables.

  5. Update the model files to include the new fields by running:
    /opt/irontec/ivozprovider/schema/bin/run-generators Provider
    Otherwise, the APIs won’t return the new fields.

  6. Apply the migration by executing:
    /opt/irontec/ivozprovider/schema/bin/console doctrine:migrations:migrate -n

Keep in mind that this will also require updating fixtures, API tests, and other related components.

As I mentioned, adding a new language is not an easy task, so it may be easier for you to replace an existing one for now—at least until you have a pull request to use as a reference. (We're planning to add a new language soon.)

Best Regards,

Kaian

Reply all
Reply to author
Forward
0 new messages