5 Replies Latest reply: Nov 10, 2011 12:26 PM by John Witherspoon RSS

    Changing Month and Day Names after load

      Hi everyone, I am trying to find a way that after the document has loaded, the following variables can be set to different values, since we want to localize the document for different cultures


      SET ThousandSep=',';

      SET DecimalSep='.';

      SET MoneyThousandSep=',';

      SET MoneyDecimalSep='.';

      SET MoneyFormat='$#,##0.00;($#,##0.00)';

      SET TimeFormat='h:mm:ss TT';

      SET DateFormat='M/D/YYYY';

      SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';

      SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

      SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';



      Any Ideas?


      I saw this topic as an exampl eto chanfe month names




      But the suggestion is on load time, and also wouldn't work if I have to format a datetime and display the date as the image:




      First I want to know if something can be done to month names, but it would be wonderful if all the variables could be changed.


      Thanks in advance for you time




        • Re: Changing Month and Day Names after load
          John Witherspoon

          I'm not sure how the example in the other thread ISN'T localizing for different countries.  Are you saying you want a user to type in their month names after the document has loaded?  That doesn't sound very user friendly.


          As far as formatting dates and decimals as appropriate to the local country, I've implemented that in my currency conversion examples.  Attached is one such example.  But again, all the set up is in script.  The user is only choosing the country (which should probably be done for them, of course).

            • Re: Changing Month and Day Names after load

              Hi John, the file you sent work perfectly using functions and consuming them inside the expressions, the only problem i still have is that when I work with controls like the calendar, I bind them to a field, and then the format is taken from the document presets, my question was more regarding this.


              As you can see, I have added a calendar to the bottom of you document, but I havent found a way to utilize your solution from the calndar's format settings, since there is no expression allowed, I have to manually enter a new pattern, decimal and thousand delimeters, my origial question was about how can I overrride the document presets post load, since we are serving the document from the internet to the users and depending on some parameters sent from the browser to the publisher we want formatting to change.




              I did place the function call as an expression inside the caledar, but it didn't worked, you can see that calendar with an X





              Sorry if my explanation is not very good



                • Re: Changing Month and Day Names after load
                  John Witherspoon

                  Ah!  Gotcha.  I didn't even think about the default calendar (I don't think I've ever used them).  Now I see why you want to do what you want to do.  I'll have to think about it.  In the mean time, here's an example of a fake calendar looking almost like the real calendar, in this specific case built so that weeks could start on Sunday instead of Monday.  I haven't checked if it can use the localization for formats in the way that I was doing in the other example, but maybe it can?  I'll probably poke at it later, but I thought I should at least show you what I'm thinking as a possible workaround if we can't figure out how to really do what you want.

                    • Re: Changing Month and Day Names after load

                      Thanks John, I'll work with this fake calendar and see how it goes.


                      Thanks again.

                      • Re: Changing Month and Day Names after load
                        John Witherspoon

                        You know, it really seems like you SHOULD be able to use those system variables.  It really seems like if you set the variables after the load, it SHOULD affect everything.  I might not go so far as to call it a bug that it does not (I'm sure QlikTech would say it's working as designed), but it definitely seems like a missed opportunity for QlikTech, like an important feature that would help with localization.  You could enter it as an idea, or maybe someone already has.  Maybe we can get this in a future version of QlikView.  Maybe it works in version 11.  I haven't downloaded it.


                        Mind you, I've never had to do any actual localization.  Surely this sort of thing IS being handled by people somehow, and hopefully in a simpler way than everything I'm coming up with.  Localization is just not my area of expertise.