How to copy a language and all translations

Userlevel 2
Badge +6

Is it possible to create a new language in TSF based on the language “NL”?

We notice that some terms are slightly different in Belgium than in the Netherlands. So I would like to copy the language “NL” to “NL-BE”. How can I do that?

If I can not do that myself in TSF, can you please provide me a script that copies al data in the required tables?

8 replies

Userlevel 5
Badge +10

Try this. Please change the variables in the where clause. Note: first create the language object before running this. 

Update tot_new
set transl = tot_old.transl
   ,transl_form = tot_old.transl_form
   ,transl_grid = tot_old.transl_grid
   ,transl_card_list = tot_old.transl_card_list
   ,transl_plural = tot_old.transl_plural
   ,tooltip_text = tot_old.tooltip_text
   ,help_text = tot_old.help_text
from transl_object_transl as tot_old
join transl_object_transl as tot_new
  on tot_old.project_id = tot_new.project_id
 and tot_old.project_vrs_id = tot_new.project_vrs_id
 and tot_old.type_of_object = tot_new.type_of_object
 and tot_old.transl_object_id = tot_new.transl_object_id
where tot_old.project_vrs_id = [projectversion]
  and tot_old.project_id = [projectname]
  and tot_old.appl_lang_id = [language_to_copy_from]
  and tot_new.appl_lang_id = [language_to_copy_to]

Userlevel 2
Badge +6

Hello Erwin,

Thank you for your quick response.

To be sure, the steps in TSF to create the new language should be:

  1. Advanced menu | Master data | Model | Application languages | Add language
  2. Default menu | Full model | Application languages | Add language
  3. Generate translation objects via the task


When these 3 steps are done we can run the script, right?

Userlevel 5
Badge +10

That sounds correct if you want to add a new language. You might also have to add the language to IAM. So please check that before syncing to a production environment. 


Userlevel 2
Badge +6

Hi Erwin,

I tried this and it works in TSF. After running the script I have a copy of all translations from "NL" in "NL-BE". I was able to change the translation for the table werk to “Projecten” in TSF.



But it does not show when running the end user application (model directly from TSF, not via IAM). I updated the language for the user via “Settings | Users | Application language”, but that did not help. Where should I set the default language for the TSF user?

Userlevel 7
Badge +19

Hi Johan,

You can specify the language in the .INI file to open the application using that language. Hope this helps!

Server = [SERVER]
Database = [SF_DATABASE]
Project = [PROJECT NAME]
ProjectVersion =
Language = NL-BE
Authentication = mswindows


Userlevel 2
Badge +6

Hi Mark,

Thank you for your response.

Okay, yes I get this. So for the web GUI I updated the settings.ini now and even restarted the website. But it still not showing the correct translation for the table werk. How can?

Userlevel 7
Badge +19

Hi Johan,

Could you check if the GUI obtains the translations successfully from your SF model by running the following code on the SF database?:

exec get_gui_transl_full '[PROJECT_ID]', '[PROJECT_VRS_ID]', 1, 'NL-BE'
-- 1 = Web GUI


Userlevel 7
Badge +19

If the above doesn’t result in the correct translations objects, try this to see if the project uses the NL-BE language:

exec get_gui_appl_lang '[PROJECT_ID]', '[PROJECT_VRS_ID]'