5

Multi language solutions best practices

Hi again. I don't know if this is the best place for this question, but I will try...

Here in Spain, about 70% of our clients sell their products and services in at least 3 languages: Spanish, Catalan/Basque/Galician and English. Some of them use more than 3 languages (Spanish, English, French, German, Italian, Portuguese). So, we want to be able to develop multi language applications with Ninox.

What does a proper multi language app need?

There are mainly three requirements, in order of importance:

  1. Field content translation (only for fields that need to be translated). For example, a product name and description needs translation, but a boolean or price field does not need translation.
  2. Translation management: a query or view that allows to check the translation status of the database fields. 
  3. Interface translation. Ninox is a multi language platform, BUT only for its basic user interface. What we want is to be able to translate table names (not very important), field/views/buttons/labels names and pop-up messages.

1. Field Content translation

There are two approaches:

  1. Create a duplicate table (for each table) for each language, and set one of the tables as the "main language". For example, the table "Products" in a solution with 3 languages would have three versions: Products_es, Products_en, Products_pt (for Spanish, English and Portuguese)
  2. Create a complete solution with only the "main language" set of tables (no language table) and then a translations table: it would have an entry for each field with the translated content. In this case, the table would have: field id, table id, record id, translated content 1, translated content 2, etc.

I think the second approach is nicer, because it will allow to manage ALL the translations in one single place.

2. Interface translation

Field labels. It seems cumbersome (but doable): simply by hiding the default label and using a formula field. It requires the creation of as many formulas as there are fields, but at least it's possible and easy to do (but not to maintain). It we use the "multiple table approach" then it's easier: the field names for each table are in their target name (but then, it would be a maintenance nightmare, because you will need to recreate ALL the formulas for each target language, as Ninox uses the label of each field in its formulas)

Table names. There is no solution (at least not an official one). BUT if we use the multiple tables approach, we can show/hide the other language tables. For example, if I use English as the main language, I will show only the Products_en table and hide the Products_es and Products_fr tables.

3. Translation management

If we use the "translations table" approach, then its very easy to maintain the proper field translation: you can query the table for the empty fields in a target language and that's it.

If we use the multiple tables approach (Products_es, Products_en, etc) then there is no easy way. Still doable, but very difficult to sync the same field in different tables.

Last but not least

Ideally, the interface and the field content showed to the end user would display the proper language content. For example, if I "prefer" the English language, then all the field names, table names and FIELD CONTENT will display in English.

It is "easy" if we use the "multiple tables approach" for field content (we just simply display and work with the target language table, for example, Products_en) and cumbersome (I don't know a proper approach) if we use the single translations table.

Regards

21 replies

null
    • Ninox developper
    • Jacques_TUR
    • 1 yr ago
    • Reported - view

    Ninox is already structured for translation. There are reserved spaces to save the labels in multilanguage. Some of the mechanisms are in place, it just needs to activate a little extra code so that the language selected by the user will automatically show the right titles. It is possible to activate it with a little time and JavaScript.

    • Consultant and developer
    • Javier
    • 1 yr ago
    • Reported - view

    Jacques TUR  Nice! how can it be activated?

    As for the field content, suppose there is no "trick" and you still have to deal with some sort of solution, like the two I proposed in my first post?

    • Mel_Charles
    • 1 yr ago
    • Reported - view

    The Ninox 0001 ref in webinar EN 2022 takes account of many Languages!

    Just might give some clues or maybe give some help (you can down load a copy) so don't alter the main file tho...

    Once logged in you can go into edit mode and all the hidden Tables/forms etc appear.

    If you don't have access just email Ninox support and ask them to give you access

      • Consultant and developer
      • Javier
      • 1 yr ago
      • Reported - view

      Hi Mel , I've tried with all my heart to subscribe to any of the Webminars (EN or DE), and already have my invite link, but it does not work and the support team tells me that they are still working in a solution. Can you please (or someone) download a backup of the database and post here a link to it?

      • Ninox developper
      • Jacques_TUR
      • 1 yr ago
      • Reported - view

      Javier Gómez Here it is

    • Ninox developper
    • Jacques_TUR
    • 1 yr ago
    • Reported - view

    Here is a first draft that already works quite well. It uses what is already partly programmed in Ninox (see attached database).

    To modify a label (or tooltip), just switch to the right language and modify it:

    And I also discovered that there was an interface already built to modify all the labels and tooltips:

    Here is the result:

    Enjoy 😀

      • Ninox developper
      • Jacques_TUR
      • 1 yr ago
      • Reported - view

      WARNING: This is a test in progress. Do not use this extension of Ninext on your database for the moment. If you want to do it, do it on a copy only.

      • Consultant and developer
      • Javier
      • 1 yr ago
      • Reported - view

      Jacques TUR great! And when do you think it will be good/secure enough to use in production environment?

      • Ninox developper
      • Jacques_TUR
      • 1 yr ago
      • Reported - view

      Javier Gómez Yes, I need to modify it a little bit. I'm going to change the method to display the labels. After that you won't be able to edit the label directly on the foirmulars, you will have to use the table interface. But it's much safer. After that, the code will be simpler and there will be no risk of confusion between the name of the field that is used as a reference in the code and the display of the labels in the chosen language. 

      I will do this in the next few weeks.
      It is also necessary that the languages are configurable at the initialization and transform the buttons of the various languages into a menu next to the image of the user profile.

      For the display of the content of the fields, you should have more input fields visible only in AdminMode and a formula that will display the right field depending on the language chosen.

      Can you tell me more about your application (to do what? and for whom?...).

      • iliper LTD
      • iliper_LTD
      • 1 yr ago
      • Reported - view

      Jacques TUR Hello Unable to open database

      • Ninox developper
      • Jacques_TUR
      • 1 yr ago
      • Reported - view

      iliper LTD I'll try to fix it. Are you work with the Mac App or the cloud ?

      • iliper LTD
      • iliper_LTD
      • 1 yr ago
      • Reported - view

      Jacques TUR Mac App

    • Nick
    • 1 yr ago
    • Reported - view

    Jacques TUR  With the last version, after the modules are loaded, clicking on a table or activating the red wrench all tables renamed as Unnamed and no changes can be made.

    I'm using the Mac app

      • Ninox developper
      • Jacques_TUR
      • 1 yr ago
      • Reported - view

      Nick Yes, as I said, this version of Ninext Language is not stable. I realized after I posted it that I didn't go about it the right way. I'm going to rework it soon and send you a stable and safe version so that you don't have the kind of problems you have. 
      Ravier's post allowed me to see that all the features are in place in Ninox to manage the multi language, it only needs a few lines to activate it. I don't know why they don't do it?

      In the meantime, please do not use this version with your main database. 
      I think that if you close the database and reopen it, you get a good table name back. But play with the database I sent you for the moment.

      Thanks for your patience. 

      • buy
      • 1 yr ago
      • Reported - view

      Jacques TUR again a sensational finding Jacques ! This will solve many issues and open-up the multi-languages solutions that can be built with Ninox. Thank you so much

    • Ninox developper
    • Jacques_TUR
    • 1 yr ago
    • Reported - view

    I redesign it, you could try it now.

    Use Localization menu in admin mode to translate all captions and tooltips.

    It work on could and on app. You try it with the app attached on previous post 

      • iliper LTD
      • iliper_LTD
      • 1 yr ago
      • Reported - view

      Jacques TUR Hello, I want to test. where to download the instructions and formulas?

      • Ninox developper
      • Jacques_TUR
      • 1 yr ago
      • Reported - view

      iliper LTD Download the attached app to this post: https://forum.ninox.com/t/p8hs4hw?r=35hs4w8#35hs4w8

      The code can be found in Trigger After Open in the app options.

      • buy
      • 1 yr ago
      • Reported - view

      Jacques TUR Works so well, Thank you Jacques, very tempting to build a real business app on this . How stable would it be with future versions of Ninox ?

      • Ninox developper
      • Jacques_TUR
      • 1 yr ago
      • Reported - view

      buy 

      The code I created only modifies the display and in that, it is not dangerous for the data and the application. But, as I don't master the Ninox code, I can't be responsible for any commercialization. That's why all sources are available to everyone. 

      Ninox is aware of what I do. I asked them if they don't mind if I use some of their code for translation. They told me that they don't have a problem with that but that they won't take any responsibility if there is a problem.

      They also told me that the translation was part of their future development. So if my code doesn't work anymore, it will probably be replaced by Ninox's code. This has already happened with the auto-completion in the code editor.

      • Consultant and developer
      • Javier
      • 1 yr ago
      • Reported - view

      Jacques TUR thanks for the info. So, if Ninox team is already working in the multi language solution, I think the best bet is to wait (hope not very much) for the "official" solution.

      Thanks again,

Content aside

  • Status Answered
  • 5 Likes
  • 1 yr agoLast active
  • 21Replies
  • 517Views
  • 9 Following