//change Error to Arabic and Change Buttons Caption To AR
//**********************************************
fd.created(function() {
fd._vue.lang.PlumsailForm_CorrectErrors = "الرجاء التأكد من الأخطاء التاليّة:";
fd._vue.lang.PlumsailForm_Submission_Success = "لقد تم حفظ هذا الملف بنجاح.";
**fd._vue.lang.RequiredValidator_Error = "معلومات غير مكتملة! حقل إلزامي";**
fd._vue.lang.SPFormToolbar_Save = "حفظ";
fd._vue.lang.SPFormToolbar_Close = "إغلاق";
//End of Created
});
i am using the scripts above to change caption and errors to ARABIC
but " fd._vue.lang.RequiredValidator_Error " is not working anymore do not know why? are there any other script for this
Dear @gkhadra,
Unfortunately, it does seem impossible to change the error currently, we’re looking into it.
Are you using SharePoint forms? For now, you can use the following code (for SP command bar):
$(".fd-toolbar-primary-commands button").click(function(){
ReplaceError();
});
function ReplaceError(){
setTimeout(function() {
var text = $("p:contains('This field is required.')" ).text();
$("p:contains('This field is required.')" ).text(text.replace('This field is required.', 'معلومات غير مكتملة! حقل إلزامي'));
}, 1000);
}
If you are using Public Web Forms or have added a Submit button to SharePoint form itself, please, add some CSS class to the Submit button, for example save-button, and then use the following code:
$(".save-button").click(function(){
ReplaceError();
});
function ReplaceError(){
setTimeout(function() {
var text = $("p:contains('This field is required.')" ).text();
$("p:contains('This field is required.')" ).text(text.replace('This field is required.', 'معلومات غير مكتملة! حقل إلزامي'));
}, 2000);
}
Dear @gkhadra,
The following code should work, try it out:
fd.beforeCreate(function(options){ options.provide.lang.RequiredValidator_Error = "معلومات غير مكتملة! حقل إلزامي" });
Dear @Nikita_Kurguzov thank you for the help it works for me
Hopefully nothing else changes.