Focal Point
[Solved] Multiple Language support for HTML page

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4437049726

January 15, 2013, 06:33 PM
eric.woerle
[Solved] Multiple Language support for HTML page
I'm hoping some one can give me a better solution then what I have already come up with. Essentially, I need to be able to create HTML pages that support multiple languages.

My ideal situation would be to have a database with all of my translations and then to select the text according to a language variable much like I would utilizing php. Unfortunately, I don't have a php server setup that would allow me to do this.

I have come up with 2 possibilities.

1) to utilize amper variables and include my html within the htmlform begin/end tags.

I don't like this idea, because I lose my ability to use the HTML editor and everything is custom from that point on

2) have each text output be its own fex and include them on the page through IFrames.

I think it's not to difficult to see where this could become extremely cumbersome and difficult to mantain. Especially if I have to create a lot of controls on a page.

Any suggestions if anyone has had to do this before would be greatly appreciated.

Thanks!

This message has been edited. Last edited by: eric.woerle,


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
January 16, 2013, 07:57 AM
Dave
Eric,

just make an HTML in your favorite editor.
Where you want amper-parameters to show add:

!IBI.AMP.XXXXX;

( replace the XXXXX with the parametername and don't forget the ; )

The add this code to the end of your procedure that 'fills' the paramaters.

-HTMLFORM

e.g.
-HTMLFORM sales/app/multi_language_page.htm


G'luck
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
January 16, 2013, 10:05 AM
eric.woerle
So elegantly simple! Thanks Dave!

And of course the first thing I do in my test was forget the semi-colon. Here is my test fex if anyone is curious

<HTML>
<HEAD>
<META id=mycharsetmeta content="text/html; charset=UTF-8" http-equiv=Content-Type>
<META id=Generation content="Created in release 7703, Generation 3.0">
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>

<SCRIPT id=IBI_OptionsScript type=text/javascript>
var cgipath = "cgipath";
var ibirls = "ibirls3";

var rltdyncalendar = "rltdyncalendar";
var gmap = "ibigmap";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";

var ibixmltree="ibixmltree";

var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>

<SCRIPT id=IBI_nls type=text/javascript src="/ibi_html/javaassist/nls.js"></SCRIPT>

<SCRIPT id=IBI_nlsVars type=text/javascript src="/ibi_html/javaassist/nlsvars.js"></SCRIPT>

<SCRIPT id=IBI_ibigbl type=text/javascript src="/ibi_html/javaassist/ibi/html/js/ibigbl.js"></SCRIPT>

<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");
</SCRIPT>
<TITLE>HtmlPage</TITLE>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
 
UpdateData();
 
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
</SCRIPT>

<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" thumbnailscale="4" elementtype="21" edaconnectionrequired="false">
<SPAN style="Z-INDEX: 1; POSITION: absolute; WIDTH: 640px; HEIGHT: 110px; TOP: 50px; LEFT: 100px" id=text1 tabIndex=1>This is test for variables 
<BR>
<BR>Variable content: !IBI.AMP.CONTENT;</SPAN>      
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value=APPPATH type=hidden ismre="1" name="ibiapp_app">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibif_ex value=app/testhtml.htm type=hidden name="ibif_ex">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_domain value=develope/develope.htm type=hidden name="IBIMR_domain">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_folder value=#ericwoerleja type=hidden name="IBIMR_folder">
<xml id=focus_xmlelement>
<script type="text/xml">
	
<rootxmlnode focoption="_FOC_NULL">
		
<variables></variables>
		
<input_controls></input_controls>
		
<other_bound_objects></other_bound_objects>
		
<requests></requests></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>  


and the fex

-SET &CONTENT = 'This is set Content';
-HTMLFORM app/testhtml.htm
  



Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2