hres / PM

Product Monographs WebForms
1 stars 0 forks source link

Bilingualism #70

Closed dbeauvai closed 8 years ago

dbeauvai commented 8 years ago

@maadarani As discussed, can you create functionality to make the application bilingual.

1) English / Francais button to switch language. 2) xml file English and French with 2-3 example. 3) cover page - make a few changes so that we can see how to call labels.

Please do not spend to much time on this. We just want to see how to do it. Ching will do the rest herself.

MartinBernard commented 8 years ago

@maadarani - approved work, pls proceed.

dbeauvai commented 8 years ago

@maadarani Can you make sure that the we keep referring to a header_en.html, header_fr.html, footer_en.html and footer_fr.html because these will change a lot over the year? We want to be able to replace them easily without having to change the xml files.

dbeauvai commented 8 years ago

@maadarani - Just looked at the code and you are using ProdMono.Master. Can we either use ProdMono_en.Master and ProdMono_fr.Master or in the ProdMono.Master, call header_en.html or header_fr.html depending on the language?

maadarani commented 8 years ago

@dbeauvai No, only one masterpage is needed; otherwise, you will have to duplicate everything into en and fr. You can dynamically load the WET html pages for en and fr from the master page (header_en.html, header_fr.html, footer_en.html and footer_fr.html)

MartinBernard commented 8 years ago

@maadarani / @dbeauvai - status update pls?

MartinBernard commented 8 years ago

@maadarani - could you please give us a estimated time to completion so we can plan accordingly?

MartinBernard commented 8 years ago

@dbeauvai - for reference to the French 2004 PM template http://www.hc-sc.gc.ca/dhp-mps/prodpharma/applic-demande/guide-ld/monograph/pmappe_mpanne_2010-fra.php

maadarani commented 8 years ago

@MartinBernard The code is completed, but the server has been moved and I have no access to it. I have pinged Anthony about it. Maybe I will upload the code here and Ching can download it and deploy it to the server?

dbeauvai commented 8 years ago

@maadarani - yes please put the code here and we will upload it.

Thanks,

OttawaOn commented 8 years ago

hi! It is ok, put code here, I could get. Thanks! Ching

On Mon, Jan 25, 2016 at 10:37 AM, Diane Beauvais notifications@github.com wrote:

@maadarani https://github.com/maadarani - yes please put the code here and we will upload it.

Thanks,

— Reply to this email directly or view it on GitHub https://github.com/hres/pmp/issues/70#issuecomment-174546195.

maadarani commented 8 years ago

@dbeauvai done

MartinBernard commented 8 years ago

@dbeauvai - pls confirm everything is done before closing.

dbeauvai commented 8 years ago

@maadarani - can you identify which file you have modified. I will download everything on my pc today.

Thanks,

maadarani commented 8 years ago
  1. App_GlobalResources folder and its content
  2. PMForm
  3. ProdMono.master
dbeauvai commented 8 years ago

@maadarani - I noticed that in the Resource.resx the label is called UsingXMLPM and when you call it in the page you are using lblUsingxml.... how does this work?

dbeauvai commented 8 years ago

@maadarani - how are you planning to switch the ControlledList.xml for the drop down list in English and French?

maadarani commented 8 years ago

Regarding the resource files, see the code here: string lang = "";

if (Request.QueryString["lang"] == null) { } else { lang = Request.QueryString["lang"].ToString(); }

Thread.CurrentThread.CurrentUICulture = new CultureInfo( (lang == "" ) ? "en-us" : lang );

Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture;

lblUsingxml.Text = Resources.Resource.UsingXMLPM; //key word in resource file is UsingXMLPM and the asp label control name is lblUsingxml

lblBody.Text = ResourceHelpers.WrapTextBlockIntoParagraphs(Resources.Resource.Body).ToString().Replace("qmark","");

lblTechSpec.Text = Resources.Resource.TechnicalSpecs;

lblBottomBody.Text = ResourceHelpers.WrapTextBlockIntoParagraphs(Resources.Resource.BottomBody).ToString();

maadarani commented 8 years ago

The control list is the same as the labels. Through the query string, you can load the values from the resource files based on the culture.

dbeauvai commented 8 years ago

@MartinBernard The header / footer and Part III are now 95% compliant to WET 4 and bilingual. We finally got the function to switch language to work perfectly on all the pages by using two master page. On in English and on in French. We are using the resources files to load all the labels according to the language.

NOTE: We will need translation for the first page but the text in English will probably change. The function to switch language is working but we don't have the text in French.

MartinBernard commented 8 years ago

@dbeauvai - thx for the update. pls clearly articulate what is required from me (if anything at this time)?

dbeauvai commented 8 years ago

@MartinBernard - nothing at this time. You will probably change the wording on the first page. Once it is completed we will request a translation.