Skip to main content
Solved

How to copy a language and all translations


Johan van Eijsden
Captain
Forum|alt.badge.img+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?

Best answer by Johan van Eijsden

Hi Mark,

In the meantime I created a new project version and now it is working fine. So ticket can be closed.

Thnx!

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

10 replies

Forum|alt.badge.img+17
  • Moderator
  • 762 replies
  • May 20, 2022

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]
 


Johan van Eijsden
Captain
Forum|alt.badge.img+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?


Forum|alt.badge.img+17
  • Moderator
  • 762 replies
  • May 23, 2022

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. 

 


Johan van Eijsden
Captain
Forum|alt.badge.img+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?


Mark Jongeling
Administrator
Forum|alt.badge.img+23

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
RDBMS = SQLSERVER
Authentication = mswindows

 


Johan van Eijsden
Captain
Forum|alt.badge.img+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?


Mark Jongeling
Administrator
Forum|alt.badge.img+23

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

 


Mark Jongeling
Administrator
Forum|alt.badge.img+23

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]'

 


Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hi Johan, 

Did you manage to get it working correctly or are you still running into some problems? 


Johan van Eijsden
Captain
Forum|alt.badge.img+6

Hi Mark,

In the meantime I created a new project version and now it is working fine. So ticket can be closed.

Thnx!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings