How do you localize the DatePicker and the TimePicker?
Our use case is that the user will set the language in the control panel and we will try to display the correct datepicker/timepicker format.
I tried setting the DatePicker/TimePicker Language property but it still is set to English and the order is still in english format (Month date year) for Date Picker and (Hour minutes AM/PM) for timepicker.
I did try the DatePicker.CalendarIdentifier and it did change the date format of the datepicker. So for a Japanese language, it was correctly set, but the timepicker only has a clockidentifier, so it did not change the display (AM/PM is still in english).
Does it mean that I have to identify the language and set the calendaridentifer/clockidentifier manually?
Thanks in advance!
UPDATE:
I did found out about the GlobalizationPreference and I could set it to the Date and TimePicker:
var calendar = Windows.System.UserProfile.GlobalizationPreferences.Calendars[0];
var clock = Windows.System.UserProfile.GlobalizationPreferences.Clocks[0];
If I set the region settings to Japanese, the clock is correctly set to 24HourClock. But the calendar is still set to GregorianCalendar.
Is this a bug or there is a different way to set the calendar so that I could retrieve correctly the GlobalizationPreferences.Calendar?
I was able to fix my issue on this one.
Somehow, although I have already set the regional settings and language settings in the control panel (example: japanese), the datepicker.Language and timepicker.Language still uses the Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride that was set.
Eventhough I set the language in the control (datepicker and timepicker) to japanese.
So what I did is that, in the startup of the application, app.xaml.cs, I set the
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride this to an empty string and now it follows the setting I set in the language settings and region settings.
Related
I am trying to implement multiple language support in my liferay Project. For this i added below code in portal_normal.vmfile of theme.
#set( $availLanguage = $stringUtil.split("hi_IN,en_US"))
<span id="language">$taglibLiferay.language("fm", null, "languageId", $toto, 0)</span>
which will add support for two language Hindi,English (United States).
and created hook for multiple language properties files.
<hook>
<language-properties>content/Language_hi.properties</language-properties>
<language-properties>content/Language_en.properties</language-properties>
</hook>
but whenever i switch my language its not changing.It always shows values from Language_en.properties file
so to check whats happening i tried printing below values in theme
$theme_display.getLanguageId()
$locale
but it always shows en_US even thought i changed language to hi_IN.
Looking for help to figure out whats going wrong.
Environment: Liferay 6.1.1 CE GA2
I think you need to add hi_IN language as Available Languages in Portal Settings if it is already not there.
To add this/or verify go to Control Panel --> Portal Settings --> Display Settings
here you will find a input box Available Languages which shows all available locales (comma seperated), make sure you have entry for hi_IN in this input box.
limit number of characters entered in cognos search and select prompt
`The below script works for text box.
<script>
// The ASDF here comes from the Name property of the prompt
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() :
document.forms["formWarpRequest"]);
fW._textEditBoxASDF.maxLength = 3;
</script>`
I need a similiar piece of code to work with Search and select prompt.
I don't have cognos in front of me but let me tell you how i did stuff like this with Javascript. Please read entirely as there are several approaches.
Put a uniquely named/id DIV tag around your native Cognos select and search prompt(The one your typing in. This will make it easy to reference with Java's dom model for the next steps. We will eventually make this default search prompt invisible/hidden but for now keep it visible until the following steps are coded/debugged.
Create an HTML control in the simliar style as the native Select and search with the proper max-length settings that you want. Use the text box on change event to update the native Cognos select and search prompt. for debugging troubleshooting i find it handy to have javascript alert the DIV innerHTML so you can see whats under the hood with the Cognos control. Sometimes i uses this innerHTML as the starting point for my "Cloned/Shadow" HTML prompt that i have control over.
Once you have your new HTML control effectively changing the Cognos control you can make it invisible.
On complex dashboards/scorecarding i wrote routines to clone cognos prompts and expose their HTML so i could create my own control that would quietly manipulate the actual hidden controls. This gave me complete control over presentation and functionality.
There are many variations on this once you have the controls innerhtml like replacing the innerHTML with one of your own immediately after the page loads that has the restrictions on length. Or simply seeing if you can massage the property learning from the innerhtml.
In Cognos 8.4 and 10 there is a new method to dynamically add a method to a control to be called prior to any other methods. It is tricky but it is on IBM's web site. I may be more cleanly implemented in 10 and also IBM is not shy about showing off these solutions on their web site.
I have a enabled this property on the form. The form has various fields along with few name pickers. When I click the Name picker I get the document changed message. How can I stop this message for Name pickers?
This issue fixed in Domino 9.0 - and should be present in the Public Beta of 9.0 published before Christmas 2012.
Also, this fix should also be available in the Extension Library releases post November 2012.
If it is not working for you let me know.
We recently upgraded to Ext. Lib version 8.5.3.20130315-0724 (4 Apr 2013). But still enableModifiedFlag does not work in IE. I have tried to describe steps below :
Open Xpage with enableModifiedProperty set to "true".
Update any input field.
Select name from value picker.
Press "X" on selected value. Boom...it shows "Do you want to move away from this page" dialog.
I checked in FireFox. It works as expected.
Cheers,
Ravi
How to change the default for language?
When a user logs in for the first time, the default language is English, and I need to change that.
You can change default language from Control panel - Portal Settings - Display Settings - Default langiuage.
Also you can override params at portal-ext.properties :
#
# Set the default locale used by Liferay. This locale is no longer set at
# the VM level. See LEP-2584.
#
user.country=US
user.language=en
BR,
Paul
From Liferay 7 (released in 2016), the default language setting can be found in the UI at:
Control Panel > Instance Settings > Miscellaneous > Display Settings
Don't forget to press "Save" at the bottom of the page.
As MDT said, it overrides whatever is in portal-ext.properties.
I wanted to put checkbox in my cognos 8 report based on some condition i.e if condition is true checkbox will appear with click mark and if it is not then without click mark.
I'm assuming you are placing this control on a prompt page...
It's kind of convoluted, but here's the only way I know how to do it. You can place 2 "Value Prompt" controls on your prompt page, and set the "Required" property to "No" on both. Set the "Parameter" property to be the same for both prompts (i.e., they will apply the same filter criteria on your query). For one of the prompts, set the "Default Selections" property so that your default value will be automatically selected on one of the controls. Also, be sure to set the "Select UI" property to "Check Box Group" (even if you only have one value to be checked) so you get a check box control.
Now that your controls are setup, you need to place them on your prompt page and apply a conditional render variable to both controls (you can look it up in Help if you aren't sure how to do this -- it's simple, but too lengthy to describe here). Basically, when your query condition is true, render the one with the check box clicked, otherwise render the one without. I not sure about the version support for the "Render Variable" property, but it works in version 8.4.
There isn't a way to my knowledge to dynamically select a default value on a prompt by linking it directly to a query -- You have to go through the conditional formatting/rendering approach.
yes i completely agree with jamey this is the only known way to do this.
there is another much difficult way to do it is by writing a java code which pretty much does tha same.
so i suggest you stick with jamey's solution.
as far as the version question comes, the 'render variable' property works the same in all versions of cognos 8 i.e. 8.2, 8.3 and 8.4.