I am using Vaadin calendar and want to change month, weeks to my own language (Mongolian). Java doesn't have Mongolian locale so I need to create custom locale.
Any suggestion?
The valid way to create Mongolian Locale is to use its constructor:
new Locale("mon", "MN")
Arguments of the constructor are ISO 639 and ISO 3166 codes of Mongolian language and country.
Note, that it doesn't mean that Vaadin must implement Mongolian version of its Calendar widget. So you still may see English calendar unfortunately.
Related
I am writing a Javascript application for watermarking a photo. I want to know if the Filestack file picker supports languages other than English.
If you are using the Filepicker you can specify language in the 'lang' parameter of the pick function.
In order to make Spanish the default language for a picker you could use the following:
client.pick({
lang: 'es'
})
More languages are listed on the documentation https://www.filestack.com/docs/javascript-api/pick-v3
I was working for German Language, You can do this.
filepicker.picker({lang: "de"}).open()
with this your modal will look like this.
enter image description here
I am using XPages 8.5.3 without the extension library. I would like to add a calendar view to an XPages. Is there any way of doing this without using the XPages Calendar from OpenNTF?
The short answer is "not easily".
The long answer depends on the layout you want to display (day, week, month, time components etc). Once you have that, you will create a calendar view in Designer, use getAllEntriesByKey() using a date range, and you have your data. Then you need to construct your UI using nested repeat controls to display the "boxes" for each date / time, adding the content to display (ensuring if you have too much it doesn't distort the layout), test it under all circumstances (months have different numbers of days, not forgetting leap years). As the person who wrote that chapter of XPages Extension Library, documenting the components involved covered a number of pages - it's not a simple piece of code!
I've been involved with XPages since 8.5.0, I'm not aware of any blog posts showing how to do it prior to Extension Library.
If this is critical functionality for the application, I would strongly recommend deploying XPages Extension Library or Upgrade Pack 1 (if it's still available). If that's not an option, I would strongly recommend just presenting the content as a list rather than a calendar layout.
Paul is right: not easy.
A second path: pick a pure Javascript client side calendar implementation (like this one) and feed it through a Json stream. Since you are on "vintage Domino", instead of using the Rest control, you need to use an XAgent.
Let us know what worked out for you
My website needs to be able to support multiple languages for multiple countries. For example, the US might have English and Spanish, while the UK might only have English. If two countries use the same language, it DOES NOT mean the content is the same.
For this reason, I decided to use the internationalization module (i18n) and I created language codes as follows:
gb-en - UK English
us-en - US English
us-es - US Spanish
I set this up with no issues, but my problem comes in with creating all the default content. For each content type, I want to:
Set the content types default language as "English"
Create translated versions of each content type for each language
I know this will mean that the Spanish content would still be in English, but it's the first step towards translating it.
What is the easiest way to create all these "default" content pages?
You could create a module implementing hook_node_insert(). This module would intercept the creation of a new node (stored with the default language) and create as many copies as needed. Each of these copies should have a different value in the field language. These copies colud be easily stored in the dabase using node_save() function.
I am working on an arabic language support project using smartclient 10.0.
It requires an arabic(hijri) calendar support for date picker component.
How can I add arabic(hijri) calendar for date picker component in smartclient?
I suppose you want to define month names in arabic, and maybe the picker grid to be ordered in another way. Then you will need to extend the DateItem for DynamicForm. Check here: http://www.smartclient.com/docs/10.0/a/b/c/go.html#class..Class
http://www.smartclient.com/docs/10.0/a/b/c/go.html#object..ClassFactory
If that is not the case, and you just need to define the order of days, months, years according to arabic specifics, please check here:
http://www.smartclient.com/docs/10.0/a/b/c/go.html#type..DateInputFormat
http://www.smartclient.com/docs/10.0/a/b/c/go.html#type..DateDisplayFormat
Also take a look here:
http://www.smartclient.com/docs/10.0/a/b/c/go.html#group..i18n
Hope this helps.
I want to use the CakePHP Helper "time" and his method niceShort to transform a date into a nice, easy to read one. Instead of the english default transformation I want to use a localized version (in my case: "german") but I don't know where to set this. How can I localize this method?
echo $time->niceShort($comment['created']);
I don't think cake handles date localization very well you might need to use $time->format() see http://cakeqs.org/eng/questions/view/localizing_time_helper and this ticket http://cakephp.lighthouseapp.com/projects/42648/tickets/638-time-helper-i18n
If you can successfully set localization parameters, niceShort finds right month/day names.
Regarding to CakePHP docs change these:
$this->Session->write('Config.language', 'ger')
Configure::write('Config.language', 'ger');
setlocale(LC_TIME, 'de_DE.utf8','de_DE','de_DE','deu_deu');