I am using input type date which is opening calendar for me. I am setting the current value by setting it in backend and passing as a model property. It is working fine.
Now, I have implemented localization with arabic version. Every thing works fine on local. When I deployed the project, calendar is showing in hijri.
I have tried to convert it to en-Us culture but it is still showing same.
Related
I have a Flutter multi-lingual app. It has a language selector, which allows to select a language among predefined list.
I successfully handle loading of my text labels.
I have however two major classes, where I have to manually set locale, when the user changes it:
DateTime and more specifically its formatting methods e.g. DateFormat.MMMEd([locale]). This one however is easy, since it supports locale as parameter. I have no issue with it;
TimeOfDay - it has format(context) method, however this method formats TimeOfDay instance according to MaterialLocalizations.formatTimeOfDay method internally to format the time and I cannot see how I can pass currently selected app locale.
So my question basically is how to set locale, when TimeOfDay.format method is executed?
The other related to above is showTimePicker, but I guess both inquires will have the same solution.
I was having the same issue with locales, And I figured out it's better not to depend on flutter's locale. I'm using shared_preferences library to save the current locale that the user choose, and I can access it in my entire app. so basically you better save the locale in shared preference when the user decides the language. hope it helps
Actually, there are two missing pieces, which fix the issue:
Set locale value in when call MaterialApp, e.g.
:
MaterialApp(
title: Env.value.appName,
locale: allTranslations.locale,
...
);
When the user changes locale, I have to call setState and rebuild the app, hence new locale to be propagated properly.
That's all.
I have used CalendarDatePicker with CalendarIdentifier="PersianCalendar" in my UWP app:
<CalendarDatePicker x:Name="btnDatePicker" CalendarIdentifier="PersianCalendar" PlaceholderText="..." IsTodayHighlighted="False"></CalendarDatePicker>
Everything works fine until the user selects a Persian date and then CalendarDatePicker displays the Gregorian date.
Any help or insight is much appreciated.
As you can find here, there is "Persian" calendar available, however I did not find any way to set CalendarIdentifier to Persian in Xaml, but it's possible to set it in Code Behind:
btnDatePicker.CalendarIdentifier = CalendarIdentifiers.Persian;
and everything should work fine:
(Note its for Liferay 6.1)
Struggling with the Liferay-ui for displaying a journal-article with the following tag:
<liferay-ui:journal-article articleResourcePrimKey="10656" />
As you can see i have hardcoded the articleResourcePrimKey for sample, and that article exists in the cms. Its WCM structured contents and template is also associated with it.
Everything works fine for the first refresh as after the portlet deployment on the server, but the next refresh for the same returns nothing (a blank page as if liferay-ui is not present at all)
I have changed the temaplte to Cacheable and then it works fine until i made modification to the template or content associated with it, but as soon i modify the template or content from WCM, it starts behaving the same.
When ever it worked just after redeployment and on first refresh of the page where the portlet is placed.
I've always used groupId and articleId rather than articleResourcePrimKey, and it works fine. These two values are easily discoverable within the admin screens for web content.
Using Liferay 6.0, but about to upgrade to 6.1 and fully expecting it to work.
I've been working with the Bing Maps AJAX v7 control for a few months now.
I ran my app this morning and none of the maps appeared - just blank
pages - my code has not changed. I even tested an old version I had deployed elsewhere which is been working for months - it's now also broken.
Digging deeper and playing with the styling, I got the control to
render, and it said that my key was invalid.
Doing the same playing around with the styling on the next page made
the control appear (wrong dimensions), but no warning about the
invalid credentials.
I have tried creating a new Developer key and using that but I get the
same result.
You need to create the Microsoft.Maps.Map object before calling other objects such as Pushpin, Location etc. I ran into the same problem and changing the order fixed the issue.
I'm using the gwt visualization library to display motion charts in a gwt app. However, the language shown in the chart is random (different language every time it loads).
This:
http://code.google.com/apis/visualization/documentation/using_overview.html#localization
says I can set it, but only through the load method. But the GWT load method does not allow me to set anything other than the version and Packages.
As far as I can tell, there is no way of explicitly setting the language using the GWT API.
Any ideas?
You can set the locale of a GWT application in many ways: Locales in GWT. My guess would be that the Visualization API uses that value to set its own locale value.
You should be able to do a quick test of this by appending locale=fr (change to your desired locale) to the address:
http://www.example.com/MyGwtApp.html?locale=fr
This will force that locale to be used by GWT.
Update: the AjaxLoader does support setting the language via the AjaxLoader.AjaxLoaderOptions:
AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
options.setLanguage("fr");
AjaxLoader.loadApi("visualization", "1", null, options);
I'm not sure you can use null for the callback parameter, but you get the general idea.
I've discovered that this is a bug, which I've submitted here:
http://code.google.com/p/gwt-google-apis/issues/detail?id=358