Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Date Formats do not display Month Name in selected language

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Date Formats do not display Month Name in selected language
 Login/Join
 
Expert
posted
I thought this always worked, but am I mistaken.

I have set &IBIWF_language to 'fr' and tried using a Date Format to hopefully display the Month in French. It does not work - it is displayed in English.

I also selected "French" from the "Dynamic Language Switch" selection on the MRE login page.

This code produces a Month Name in English:

-SET &IBIWF_language = 'fr';

DEFINE FILE CAR
DT1/A8YYMD = '20110308';
DT1A/DMtrYY = DT1;
END

TABLE FILE CAR
PRINT
DT1
DT1A
COUNTRY NOPRINT
WHERE READLIMIT EQ 1
END
-RUN

I thought this would automatically work. Do I have to use a Date Function?

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
You'll need to:

SET LANG = &IBIWF_language


For [Web]FOCUS to know what language you want to use.


&IBIWF_language is there for us to know what language selection the user made at the WF client level but in my experience has no relevance at the FOCUS level. Only MRE/BID stuff.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Hmmm, maybe what I said is not entirely correct ... you'll need SET LANG so WebFOCUS can pick the right TITLE_xx from the master files and customize the error messages.

I am not sure if having a /DMtrYY field will make the automatic translation but in the past I've always resorted to using DATETRAN for that purpose.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
No difference:

-SET &IBIWF_language = 'fr';

SET LANG = &IBIWF_language
-RUN

DEFINE FILE CAR
DT1/A8YYMD = '20110308';
DT1A/DMtrYY = DT1;

DT2A/A17 = LCWORD(17,CHGDAT('YYMD', 'MXDYY', DT1, 'A17'), 'A17') ;

END

TABLE FILE CAR
PRINT
DT1
DT1A
DT2A
COUNTRY NOPRINT
WHERE READLIMIT EQ 1
END
-RUN


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
quote:
I've always resorted to using DATETRAN for that purpose


Try this:

DEFINE FILE CAR
DT1/A8YYMD = '20110308';
DT1A/MDYY = DT1;
DT2A/A40 = DATETRAN(DT1A, '(MDYY)', '(trB)', 'FR', 40, DT2A);
END

TABLE FILE CAR
PRINT 
DT1
DT1A
DT2A
COUNTRY NOPRINT
WHERE READLIMIT EQ 1
END



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
Neftali,

Thank - I'll give that a try, but I wish I didn't have to, for two reasons: I have to modify several reports to resolve this issue and this DATETRAN function is an oddity in its syntax.

Cheers,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Well, if National Language Support (NLS) is not really supported in WF when it comes to dates, one can always resort to MLS ... "Manual Language Support" which even with its limitations doesn't fail Wink

-SET &IBIWF_language = 'fr';

SET LANG = &IBIWF_language
-RUN

DEFINE FUNCTION DTFMT (ADATE/A8YYMD, FMTLANG/A2)
MTH/A2 = EDIT(ADATE, '$$$$99$$');
FLANG/A2 = UPCASE(2, FMTLANG, FLANG);
MTHNM/A20 = IF FLANG EQ 'FR' OR 'FC' THEN (
               DECODE MTH (01 'janvier'  02 'février' 03 'mars'      04 'avril'   05 'may'      06 'juin'
                           07 'jouillet' 08 'août'    09 'septembre' 10 'octobre' 11 'novembre' 12 'décembre'
                           ELSE '?')
-* Add support for other languages here.
-*          IF LANG EQ 'XX' THEN (
-*             DECODE MTH (....)
-*
-* Default to English
            ) ELSE (
               DECODE MTH (01 'January' 02 'February' 03 'March'     04 'April'   05 'May'      06 'June'
                           07 'July'    08 'August'   09 'September' 10 'October' 11 'November' 12 'December'
                           ELSE '?')
            );
DTFMT/A30 = MTHNM || (' ' | EDIT(ADATE, '$$$$$$99')) | ' ' | EDIT(ADATE, '9999$$$$');
END

DEFINE FILE CAR
DT1/A8YYMD = '20121208';
DT1A/DMtrYY = DT1;

DT2A/A17 = LCWORD(17,CHGDAT('YYMD', 'MXDYY', DT1, 'A17'), 'A17') ;

NEW_DT/A30 = DTFMT(DT1, '&IBIWF_language');
END

TABLE FILE CAR
PRINT
DT1
DT2A
NEW_DT
COUNTRY NOPRINT
WHERE READLIMIT EQ 1
END
-RUN



This won't help you though as you'll still need to change your code to make use of the function ... thinking about it, you could actually use DATETRAN directly within the function although it does not support as many languages ...

Anyway, I hope you'll find a more "native" way to support this within the product. I think many of us will benefit from it.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
Confirmed by B.J. at Tech Support - on-the-fly date formatting does not work, must use DATETRAN function.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
One of my colleagues found an option on the WF Reporting Server that solves this issue!

Reporting Server > Configuration/Monitor > NLS > DATEOUTPUT:

quote:
DATEOUTPUT = enabling keyword

Internal default: DEFAULT

Localizes month and week name on date format output (Display Option: T, t, TR, tr, W, w, WR and wr). The keyword values are:

DEFAULT English month and week name regardless language setting
LOCALIZED Localized month and week name with the current language setting

SET DATEOUTPUT= command and ON TABLE SET DATEOUTPUT in TABLE request are the same effect, and override this default setting in NLS configuration.

Now, if only we can get the accents to display properly...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
DATEOUTPUT is very interesting ... thanks for sharing Francis.

quote:
Now, if only we can get the accents to display properly...


Using CODE_PAGE = 1252 - Windows (Latin 1):

SET LANG = fr
SET DATEOUTPUT = LOCALIZED

DEFINE FILE CAR
TDAY1/DMtrYY WITH CAR=15022012;
TDAY2/DMtrYY WITH CAR=12082012;
TDAY3/DMtrYY WITH CAR=15122012;
END
TABLE FILE CAR
PRINT TDAY1 AND TDAY2 AND TDAY3
WHERE RECORDLIMIT EQ 1
ON TABLE SET PAGE NOPAGE
END


Gives me:

 
TDAY1            TDAY2         TDAY3 
15 février, 2012 12 août, 2012 15 décembre, 2012 



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
On our UNIX hosted server the accents don't display, we get a little black box...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Hmmm, what about CODE_PAGE = 137 or 437 ... I don't remember which one of them supports Western European (Latin 1) characters but it should be sufficient to display those accents ... the change has to be made on both Rep Server and WF Client.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
I have set it to 1252.

I'll try 137.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Date Formats do not display Month Name in selected language

Copyright © 1996-2020 Information Builders