在PHP中本地化当前时间 [英] Localize current time in PHP

查看:87
本文介绍了在PHP中本地化当前时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用PHP显示当前时间(使用) :

Trying to display current time with PHP (using this):

$date = date('m/d/Y h:i:s a', time());                      
echo $date;

就这么简单.如何本地化?我想把几个月和几天翻译成希伯来语.

As simple as it gets. How do I localize it? I want to translate the months and days to Hebrew.

谢谢.

推荐答案

Zend_Date 已完全国际化.您应该检查出这样做的简单方法:

Zend_Date is completely internationalized. You should check that out for a simple way to do it:

的所有全称和缩写名称 支持以下月份和工作日 超过130种语言.方法 支持输入和输出 日期使用的本地化名称 月份和工作日,在 与之相关的常规格式 每个地区.

All full and abbreviated names of months and weekdays are supported for more than 130 languages. Methods support both input and the output of dates using the localized names of months and weekdays, in the conventional format associated with each locale.

这篇关于在PHP中本地化当前时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆