fullcalendar version 1.6 language support? - fullcalendar

I am trying to add Arabic lang to full calendar v.16 because I have Project running in this version does anybody know how to implement it in this version?

I'm pretty sure you have already solved this but I'll write here a workaround since lang support seems not to be implemented on 1.6.x.
For example I'm changing its values in Spanish. Don't know if Arabic language will work with these, but some other languages might.
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
// just override these vars defined in fullcalendar.js
monthNames: ["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Novimiembre","Diciembre"],
monthNamesShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],
dayNames:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],
dayNamesShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],
buttonText:{prev:"<span class='fc-text-arrow'>‹</span>",next:"<span class='fc-text-arrow'>›</span>",prevYear:"<span class='fc-text-arrow'>«</span>",nextYear:"<span class='fc-text-arrow'>»</span>",today:"hoy",month:"mes",week:"semana",day:"día"},
//rest of fullcalendar setting ....

Related

Here Maps Api for Javascript 3.1 - Very Slow

Between Here Maps Api for Javascript version 3.1 and Here Maps Api for Javascript version 3 is a big difference.
The loading time, zooming, routes displaying is much much slower , up to 3 times.
We are usisng the default settings, but even so, on half of our computers on which we used HERE version 3 we cannot use the new version 3.1. It is not loading (cannot be used).
What can be done? I cannot afford to change all the computer to another computers of last generation.
Are there some settings which can be used to reduce the responsive time of the maps?
What you could do is to load legacy packages and use legacy rendering engine (no tilting/rotation, only raster base layer):
load legacy core package:
<!DOCTYPE html>
<html>
<head>
.....
<script src="https://js.api.here.com/v3/3.1/mapsjs-core-legacy.js" type="text/javascript" charset="utf-8"></script>
.....
create map with legacy rendering engine:
// assuming platform is instantiated
// Obtain the default map types from the platform object:
let defaultLayers = platform.createDefaultLayers();
let map = new H.Map(
document.getElementById('mapContainer'),
defaultLayers.raster.normal.map,
{
zoom: 10,
center: { lat: 52.5, lng: 13.4 },
engineType: H.map.render.RenderEngine.EngineType.P2D
});
by default, fractional zoom levels are enabled in 3.1, therefore to have crisp map it is recommended to disable it:
//assuming that UI and mapevents behavior are instantiated
// disable fractional zooming for Behavior
behavior.disable(H.mapevents.Behavior.Feature.FRACTIONAL_ZOOM);
// add H.ui.ZoomControl with the disabled fractional zooming
var zoomControl = new H.ui.ZoomControl({fractionalZoom: false});
ui.addControl('zoom', zoomControl);
For more information check the Migration guide

How to integrate Indian Language with tinymce 4.0.12

I am using tinymce 4.0.12 in my wicket project, I have a plugin for Indian language like:
PramukhIme and IndicIme in my tinymce plugin folder, but these plugins are created according to the older version of tinymce and new version of tinymce has changed its structure to read its plugin.
My tiny initiation code is:
tinyMCE.init({
mode : "exact",
elements : "textarea",
theme : "modern",
language :"en",
plugins :pramukhime,
toolbar1 :"pramukhime,pramukhimeclick,pramukhimeconvert,pramukhimehelp"
});
Is there any way or other plugins according to the new structure of tinymce so that i can use it?
Finally i have done it without using any third party plugin in TinyMCE 4!
Note: Few things you have to keep in mind:
The language works upon the fonts installed in your OS.
Download valid fonts: Indian -> Regional fonts and install it in your OS.
Make sure all the installed fonts are proper and valid and downloaded from a proper source.
If you are using Windows, the installation path would be like this:
C:\Windows\Fonts\
Code:
tinyMCE.init({
mode : "exact",
elements : "textarea",
theme : "modern",
toolbar: "fontselect",
font_formats:"SCiRound=SCiRound;Shonarb=Shonarb;Shonar=Shonar;vrindab=vrindab;Vrinda=Vrinda;Devanagari New=Devanagari New;Kruti Dev=Kruti Dev;Kalpurush ANSI=Kalpurush ANSI;Aruna=Aruna;Haritha=Haritha"
});

including jquery ui dialog in 3.3.1

I went into the wordpress 3.3.1 folders to see if and what had changed specifically re the jQuery-ui-dialog for enqueueing it.(I am using admin_init, after all it is in the admin area)
Reason for doing so was I could not use the class name to set the options on the dialog.
i found the js files were differently named from what is used in the enqueue docm / help I have found.
eg they are (in the wordpress\wp-includes\js\jquery\ui" directory) now, all postfixed with .min eg jquery.ui.core.min, jquery.ui.dialog.min etc.
Question then,...Does this mean the names used in enqueueing should be the same.?
eg wp_enqueue_script('jquery-ui-dialog-min');
where before it was
wp_enqueue_script('jquery-ui-dialog');
One folder back (in \js\jquery) the "jquery.js" is still named the same.
I suspect that the enqueueing results in the following function using .dialog to fail (else the class name has changed?)
jQuery(document).ready(function(){
jQuery("#dialog-form").dialog(
{
dialogClass : 'wp-dialog',
autoOpen: false,
width: 400,
resizable: false,
modal: true,
title: "One Popup"
});
The .dialog class does not respond / do anything.
Even tried the
$Mydialog = ....approach for setting it after init, but no luck there either
Any help would be greatly appreciated,..many days of frustration and trying everything has had no success.
Thx
Neal
Codex still lists it as jquery-ui-dialog, so I guess thats correct.
Are you also enqueueing jquery and jquery-ui-core before you enqueue jquery-ui-dialog?

Google Translate on WordPress(.com)

Since scripts are not allowed on WordPress(.com) blogs, I was wondering whether there is a way to get the following Google Translate code to work on a WordPress (.com) blog via the Text widget? Thanks in advance.
<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
You can't run most JS on wordpress.com, but there seems to be a workaround to use Google Translate: http://en.forums.wordpress.com/topic/translation-widget?replies=20
You're making it too complicated -- you can just use html. Color coded explanation with a little story here:
http://conradcook.wordpress.com/2012/07/21/machine-translation-fail/

jQuery plugin not loading -- script failing

I've tried this with a couple of different plugins, so I'm sure it's not them. I also have one running on my personal machine and it works just fine.
I'm loading jQuery and then loading the plugin second. Then the next line of code is calling the plugin via:
$("a[rel]").colorbox(...)
or
$("a[rel]").overlay(...)
and I'm getting "object does not support property or method". It's not on the html object, I've narrowed it to the actual function call to jQuery plugin -- the $("a[rel]") selector is working fine alone. It's as if the plugin is never actually loading.
Have any of you ever seen this? I'm running on XP, so IIS6 (5?) Latest jQuery 1.3.2 though I tried 1.3.1 and 1.2.6.
Much appreciated!!!
I had the same problem yesterday, and it was because I had this line twice:
<script src="jqueryScripts/jquery-1.3.1.js" type="text/javascript"></script>
It was in an ASP project and I included another .asp page which also had the reference, so it took me 2 hours to figure out..
Maybe you have the same problem?
Do you try to enable JavaScript debugging in your browser, maybe you can catch some error, and that why browser doesn't loading plugin file. You can also try to load plugin dynamically using getScript method of jQuery and on complete event run your function.
$.getScript("http://dev.jquery.com/view/trunk/plugins/color/jquery.color.js", function(){
$("#go").click(function(){
$(".block").animate( { backgroundColor: 'pink' }, 1000)
.animate( { backgroundColor: 'blue' }, 1000);
});
});

Resources