dongmi0760
dongmi0760
2017-04-05 20:32

PHP内部函数更改返回值的语言

Is there a way to change the return value language of PHP function ? ( from server side, not depending to client machine )

getdate()

<?php
$today = getdate();
print_r($today);
?>

return

Array
(
    [seconds] => 40
    [minutes] => 58
    [hours]   => 21
    [mday]    => 17
    [wday]    => 2
    [mon]     => 6
    [year]    => 2003
    [yday]    => 167
    [weekday] => Tuesday
    [month]   => June
    [0]       => 1055901520
)

I wanted to change "Tuesday" to "Mardi" ( in french ) or any other language..

I didn't find var like "preferred language"..

I put <html lang='fr'> " between <Form> and <head>, doesn't change. I guess I have to put something in my php.ini (or somewhere else).

If this is the solution ( perhaps someone will give me the exact line to put in and where) and so, I will have a second question: How to manage different websites with different preferred language because this solution will affect main configuration ? I have 1 VPS, with several domain, some in English, some in french...

Thanks.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

相关推荐