how add Persian Calendar to Hugo - calendar

Hugo only uses the Gregorian calendar because of the use of the Google language. And Hugo does not support Plugin.
Is it possible to automatically convert html files to Persian calendar using npm packages like this https://github.com/jalaali/jalaali-js when outputting from Hugo? Or tell me if you have a good solution.

From what I, by the "persian calendar" you mean, the months/lunar cycle in the persian calendar including the day and month names, correct?
This is what I believe you will have to do to get this to work.
As you can see, Hugo uses the GoLang date-time system:
https://gohugo.io/functions/format/#gos-layout-string
which is here: https://golang.org/pkg/time/#ANSIC
It doesn't seem this has a native Lunar calendar system (I call this Lunar calendar because I'm not used to the Persian calendar, but my own cultures, which is Lunar and different than the European system).
But, this can be possibly added:
https://pkg.go.dev/github.com/yaa110/go-persian-calendar
But, as this could be QUITE some work, it could be much simpler if you say EXACTLY what you are trying to do... other than (automatically convert html files to persian calendar).
The answer to that is, sure. Just Grep the string...
But I don't think that's what you are really looking for.
Best of luck!

Related

Localize DatePicker / DateTimePicker

I use a DateTime Picker in an editor of my app (within a PickerComponent). I'm using it only in lightweight mode, since DateTime Picker fail on Android if not (not tested since some months, but I suppose it still the case).
I've successfully translated the buttons "Cancel" and "Done" with the L10N API, but I can't translate months (for Date type) or abbreviated day/month (for DateTime).
The keys for each months are putted in the .res file, that worked for the buttons, but it does not work for the months of the picker.
Any hint on how to achieve this localization ? Some of our customer are really bad at english... Thanks in advance !
This is localized via SimpleDateFormat and its class DateFormatSymbols. Unfortunately this has no way to globally customize that value using the standard project resource bundle which seems to be a serious omission of that code. This is something we'll need to fix via the issue tracker, I don't see a short term workaround from a brief glance at the code as it assumes you would have access to the SimpleDateFormat which is highly impractical.

Localize lightweight date picker in Codename One

On Android and on iPhone, the Codename One lightweight picker always is in English, like in the following screenshot. How can I localize it in Italian (or in any other language used by the smartphone user)?
You can localize "Cancel" and "Done" in the resource bundle to replace those two labels. The month values are a bit more problematic as they are taken from SimpleDateFormat which doesn't have an easy path for localization. We should probably use the same localization conventions as used by the com.codename1.ui.Calendar class. I think this is something we can track via the issue tracker.

display a calendar function on lots of different websites

first of all, please excuse my ignorance, this is an exploratory question, rather than a specific programming program that needs solving.
I have a number of clients that have unique websites, none of which I was involved in developing. I would like them to be able to display a calendar of common events, but which would also contain events unique to them.
Is it possible using something like Server Side Includes to be able to give them a few lines of code which they could insert into their website (on any particular page) which might display a calendar type display, which their users can then interact with?
I guess I am looking for something similar to a Google calendar but I do not want to use a Google calendar. The key thing would be that they would only need to insert the few lines of code on one of their webpages; they wouldn't have to install any software on their servers.
Any suggestions?
Thanks
Damien
There are are all sorts of web calendars that will allow you to include them on a web page (typically using javascript, not SSI). Some are targeted at specific platforms (ie, Wordpress) and some are more generic.
Try searching "web calendar widget" for examples.
You'd have to put some amount of content on their site. If you can do that, you can include some javascript that will load more javascript from the server side that can do the bulk of the calendaring work for you.
You wouldn't be able to just drop a few files on the server and have them work, you'd need some way to link to them by changing the existing content on at least one of the pages.
I may be misunderstanding your question though.
If you are looking for specific recommendations on web calendar widgets, Arshaw's fullcalendar is my favorite to date.
It displays a great calendar that can be easily styled with css or jquery ui themeroller and is very programmable. The website has great documentation and examples as well.
Per using it on different sites, it supports that easily.
Note, I'm not affiliated with that calendar at all, just a satisfied customer.

Online Calendar

Is it possible to develop an online calendar, if a user clicks on 'Import', all the events should automatically get imported into outlook or iCal?
Importing data into Outlook or iCal can be done using a suitable export format. Direct import would require writing a browser plugin, it's possible but probably not feasible.
More or less. Certainly you can provide data in the standard iCal format (and it is used to nice effect on http://conferences.yapceurope.org — having selected which talks you wish to attend at a multitrack conference, it will generate a custom iCal file for you).
That works with Google Calendar and with Apple iCal. I have no idea what Microsoft Outlook supports.

View Google Sketchup (.skp) files on the web (Rehash)

Can anyone point me to any libraries or products that will allow me to pass a Google Sketchup SKP file in and as a result view the 3D model on a website in either Silverlight, Flash or HTML Canvas?
I know both Flash & Silverlight now support 3D out of the box, so I'm hoping there has been some updates since answers below were given over a year ago.
Silverlight's still kinda slow as far as web 3d engines are concerned (although I'm expecting great things from it in the next few years).
So in flash there's alot of evolved graphic engines like Papervision3D for example. You use these libraries to load a certain 3d file format, I forgot the name.
Anyway, you then just export your sketchup file into this format, or into another format you could later convert. Although I think you need the FULL version of sketchup to export if I'm not mistaken...
You can use a tool such as 3DPaintBrush to export the Sketchup files to XAML which can then be used in Silverlight projects. Unfortunately 3DPaintBrush isn't free, but it does have a 15 day trial to see if it is worth getting.

Resources