where and how i put the lc_time_names parameter?
-
- User
- Posts: 450
where and how i put the lc_time_names parameter?
with mysql, we can specify the local names for days by example.
so in mysql query we set the lc_time_names ='FR_fr' to have the name of the days in French instead of english..
i tried to set the parameter in phpmaker, advanced settings, option "Database time zone (for SET TIME ZONE)" .
i enter in the field : lc_time_names ='FR_fr'
but nothing appened, data (like daynname(date) still appears in english language (whereas all the other language setting are fine translated in phpmaker).
do i need a special syntaxe or double quote or other scheme to enter lc_time_names ='FR_fr' ?
i checked the documentation and there is not example of the correct synthaxe we need to enter in phpmaker.
best regards
-
- User
- Posts: 450
thank you my Lord, it run fine :
// Database Connected event
function Database_Connected(&$conn) {
// Example:
//if ($conn->info["id"] == "DB")
// $conn->Execute("Your SQL");
$conn->execute("SET lc_time_names = 'fr_FR';");
}
By the way, that kind of parameter should be in the language file or region files like in the locale setting fr.json file with other regional parameter....
-
- User
- Posts: 877
- Location: Switzerland
Hi,
I trying to get the day name in german.
My language Id is de-CH and the local setting is also correct and the languate id too.
But I am not getting the german daynumnber.
I am using the following code in a view to get the day name of a datetime field:
Date_Format(f.Start, '%a') AS Tag,
Where to check?
thanks
mpol_ch
-
- User
- Posts: 877
- Location: Switzerland
No,
It is in a view and between Select and From.
What want to reach is, is to get the day abbrevation in german, hence I am using the german language with id de-CH.
Generally it should do this with
SET lc_time_names = 'de-CH'
But where to put this SET lc_time_names = 'de-CH' ?
Regards
mpol_ch
-
- User
- Posts: 9383
- As said you should use Datebase_Connected server event,
- You should use correct locale value, read MySQL Server Locale Support.