Page 1 of 1

French language et character \

PostPosted: Fri Sep 14, 2012 2:11 pm
by rben
In php file language, in French we have to put a \ before the apostrophe.

example of a line of the file lang FR:

$ lang ["bt_change_item"] = "Change the \ object";


The problem is that this character is reflected in the admin interface, see the screen in attachment.

A solution ?

Thank you very much

Re: French language et character \

PostPosted: Sun Sep 16, 2012 7:56 pm
by brunitika
Hi!

Are you sure that you have to put the backslash (\)? Basically when you have double-quote (") on the variable you don't need to put it before an apex (').

Re: French language et character \

PostPosted: Mon Sep 17, 2012 3:55 pm
by rben
Hello,

yes I am obliged if there are lots of failures. (calendar dates are not displayed, for example.

thank you

Re: French language et character \

PostPosted: Tue Sep 18, 2012 10:25 am
by brunitika
Then you can use the function "stripslashes" on php when you are recalling the variable (you can search the variable with regex into the directory).

For example, for "change item" you cna modify on bookings.admin.php on line #60:

Code: Select all
<input type="button" value="'.$lang["bt_change_item"].'" style="" onclick="document.location.href=\'index.php?page=items&action=edit&id='.$_REQUEST["id_item"].'\'">


with

Code: Select all
<input type="button" value="'.stripslashes($lang["bt_change_item"]).'" style="" onclick="document.location.href=\'index.php?page=items&action=edit&id='.$_REQUEST["id_item"].'\'">


P.S.: this was the modified line (see http://forum.ajaxavailabilitycalendar.com/viewtopic.php?f=23&t=1429) but the basic is the same