Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bilingualism #70

Closed
dbeauvai opened this issue Jan 20, 2016 · 21 comments
Closed

Bilingualism #70

dbeauvai opened this issue Jan 20, 2016 · 21 comments
Assignees

Comments

@dbeauvai
Copy link
Contributor

@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
Copy link

@maadarani - approved work, pls proceed.

@dbeauvai
Copy link
Contributor Author

@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
Copy link
Contributor Author

@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
Copy link
Contributor

@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
Copy link

@maadarani / @dbeauvai - status update pls?

@MartinBernard
Copy link

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

@MartinBernard
Copy link

@maadarani
Copy link
Contributor

@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
Copy link
Contributor Author

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

Thanks,

@OttawaOn
Copy link
Contributor

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
#70 (comment).

@maadarani
Copy link
Contributor

@dbeauvai done

@MartinBernard
Copy link

@dbeauvai - pls confirm everything is done before closing.

@dbeauvai
Copy link
Contributor Author

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

Thanks,

@maadarani
Copy link
Contributor

  1. App_GlobalResources folder and its content
  2. PMForm
  3. ProdMono.master

@dbeauvai
Copy link
Contributor Author

@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
Copy link
Contributor Author

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

@maadarani
Copy link
Contributor

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
Copy link
Contributor

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.

@MartinBernard MartinBernard assigned dbeauvai and unassigned maadarani Jan 27, 2016
@dbeauvai
Copy link
Contributor Author

@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
Copy link

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

@dbeauvai
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants