Translations of Custom Entities

Ask your questions here.
User avatar
Schelle
Posts: 28
Joined: 14 Sep 2023, 03:05
Name: Schelle Ticka
Location: Brisbane Australia

Translations of Custom Entities

Post by Schelle »

Hello,

I am very new to this application, and I love it, but how do I create view files or update the language files for Custom Entities?

I am building this for my team which operates in multiple languages in multiple countries, but I only want one entity for each type (Example Audit Reports), as the data needs to be stored in the same table.

Thank you in advance :)
User avatar
support
Site Admin
Posts: 6221
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Translations of Custom Entities

Post by support »

This way is not supported. App data only in one language.
Only one solution is create own Entity of each language.
User avatar
Schelle
Posts: 28
Joined: 14 Sep 2023, 03:05
Name: Schelle Ticka
Location: Brisbane Australia

Re: Translations of Custom Entities

Post by Schelle »

support wrote: 16 Sep 2023, 12:07 This way is not supported. App data only in one language.
Only one solution is create own Entity of each language.
Hi,

So you are saying install two or more Rukovoditel applications, one for each language? That would be hard to manage changes.

I may need to look at alternatives, I was so excited about this. I will think outside the box, I am sure I will find some type of solution. :D
User avatar
support
Site Admin
Posts: 6221
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Translations of Custom Entities

Post by support »

No, I mean create own Entity in for each language in the same application and configure access to Entity.
So user form Country 1 will have access to Entity 1, user from Country 2 will have access to Entity 2
In entity fields configuration there is function to copy fields.
Edition Nehemia
Posts: 59
Joined: 18 Feb 2023, 16:44
Name: Christoph Berger
Location: Steffisburg, Switzerland

Re: Translations of Custom Entities

Post by Edition Nehemia »

I understand the need for entities to be able to translate.

@ Sergey: Wouldn't it be relatively easy to first check if a custom language constant was made for that entity (e.T TEXT_ENTITY_{id} or TEXT_REPORTS__{id})?

If yes, this will be used. If no, the settings are applied.

(On the other hand, English should be enough. Otherwise, you cannot work together within the entity.)
User avatar
Schelle
Posts: 28
Joined: 14 Sep 2023, 03:05
Name: Schelle Ticka
Location: Brisbane Australia

Re: Translations of Custom Entities

Post by Schelle »

support wrote: 18 Sep 2023, 08:10 No, I mean create own Entity in for each language in the same application and configure access to Entity.
So user form Country 1 will have access to Entity 1, user from Country 2 will have access to Entity 2
In entity fields configuration there is function to copy fields.
Thanks for the clarification, I will give it a try :-)
User avatar
Schelle
Posts: 28
Joined: 14 Sep 2023, 03:05
Name: Schelle Ticka
Location: Brisbane Australia

Re: Translations of Custom Entities

Post by Schelle »

support wrote: 18 Sep 2023, 08:10 No, I mean create own Entity in for each language in the same application and configure access to Entity.
So user form Country 1 will have access to Entity 1, user from Country 2 will have access to Entity 2
In entity fields configuration there is function to copy fields.
Hi Sergey,

I created a test for the second entity in a new language (English and Turkish), and I set up when a new record is added to the English entity it clones to the Turkish entity to the other entity, BUT I am struggling to get the action working for when a record is edited/updated.

EXAMPLE: One site in Turkey adds a new Hazard report. This report is cloned to the English entity. That all works really well :-) BUT, as soon as the English speaking Manager adds their input into the record, in the English entity, I can not get the update moved to the Turkish version. I don't want to clone it again, as it is actually the same hazard report, not a new one.
Didou12
Posts: 487
Joined: 14 Jan 2023, 14:53
Name: Louis
Location: Montreal, Canada

Re: Translations of Custom Entities

Post by Didou12 »

You can use Automate actions.

Also, you can just use One entity with multiple fields (each for each language) and selected which field is shown for the user. Also you can have One entity and 2 sub entities (with the field "subentity records") to have information in the parent entity for both languages and one sub-entity per language.
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
eddydeniro
Posts: 174
Joined: 23 Feb 2021, 16:31
Name: Edi Supriyadi
Location: BDG Indonesia

Re: Translations of Custom Entities

Post by eddydeniro »

Hi Schelle,

In my case, creating plugin is the best workaround for this purpose.
The concept is to create partner tables for Rukovoditel parts to be translated.
If you just want to translate entity name, which is saved in table app_entities, create its partner table (for example: plugin_entities) having at least entities_id, language_id, name (to save translation result of one spesific entity and language).
In my case, I needed to translate all entity attributes (name, listing heading, window heading, etc), field name, and form tab, so I created 4 tables that linked to app_entities, app_fields, app_entities_configuration, and app_forms_tabs.
It's a bit tricky to display the translation result if you don't want to mess with the core files.
We can use two ways for this : via app_layout setting (server side) and via javascript (client side).

Here are some screenshots when I tested the plugin in a fresh installation of Rukovoditel 3.4.4, just to show you that it is highly feasible to make your Rukovoditel application multilingual in single installation. Here I translate into Indonesian (my native language) and Russian (by the help of Google Translate).
Roox-Translator-Screenshots conv 1.jpeg
Schelle wrote: 14 Sep 2023, 03:12 Hello,

I am very new to this application, and I love it, but how do I create view files or update the language files for Custom Entities?

I am building this for my team which operates in multiple languages in multiple countries, but I only want one entity for each type (Example Audit Reports), as the data needs to be stored in the same table.

Thank you in advance :)
User avatar
Schelle
Posts: 28
Joined: 14 Sep 2023, 03:05
Name: Schelle Ticka
Location: Brisbane Australia

Re: Translations of Custom Entities

Post by Schelle »

eddydeniro wrote: 05 Dec 2023, 10:50 Hi Schelle,

In my case, creating plugin is the best workaround for this purpose.
The concept is to create partner tables for Rukovoditel parts to be translated.
If you just want to translate entity name, which is saved in table app_entities, create its partner table (for example: plugin_entities) having at least entities_id, language_id, name (to save translation result of one spesific entity and language).
In my case, I needed to translate all entity attributes (name, listing heading, window heading, etc), field name, and form tab, so I created 4 tables that linked to app_entities, app_fields, app_entities_configuration, and app_forms_tabs.
It's a bit tricky to display the translation result if you don't want to mess with the core files.
We can use two ways for this : via app_layout setting (server side) and via javascript (client side).

Here are some screenshots when I tested the plugin in a fresh installation of Rukovoditel 3.4.4, just to show you that it is highly feasible to make your Rukovoditel application multilingual in single installation. Here I translate into Indonesian (my native language) and Russian (by the help of Google Translate).

Roox-Translator-Screenshots conv 1.jpeg
Schelle wrote: 14 Sep 2023, 03:12 Hello,

I am very new to this application, and I love it, but how do I create view files or update the language files for Custom Entities?

I am building this for my team which operates in multiple languages in multiple countries, but I only want one entity for each type (Example Audit Reports), as the data needs to be stored in the same table.

Thank you in advance :)
Hi Eddy,

Did you develop this plugin, is it available for sale???

I am still trying to get things to work, but Automatic actions are not working for me for updating records.
Post Reply