Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Date 流体中的12小时循环AM/PM_Date_Time_Typo3_Fluid_Tx News - Fatal编程技术网

Date 流体中的12小时循环AM/PM

Date 流体中的12小时循环AM/PM,date,time,typo3,fluid,tx-news,Date,Time,Typo3,Fluid,Tx News,在TYPO3中,我使用新闻扩展创建一个事件。在我的列表视图中,我使用以下代码片段来显示事件的结束时间 {newsItem.eventEnd} 其结果是“-20:00 Uhr”(德语,因此称为“Uhr”) 我想要一个格式,切换到时间为“-08:00pm”的英语翻译,我假设这是不可能的流体,因为我的搜索没有结果。有什么解决方法吗?日期格式viewhelper使用与默认PHPdate和strftime函数相同的格式,因此您可以使用%I:%M%p获得晚上8:00的时间。有关详细信息,请参阅和。您可以将格

在TYPO3中,我使用新闻扩展创建一个事件。在我的列表视图中,我使用以下代码片段来显示事件的结束时间

{newsItem.eventEnd}

其结果是“-20:00 Uhr”(德语,因此称为“Uhr”)


我想要一个格式,切换到时间为“-08:00pm”的英语翻译,我假设这是不可能的流体,因为我的搜索没有结果。有什么解决方法吗?

日期格式viewhelper使用与默认PHP
date
strftime
函数相同的格式,因此您可以使用
%I:%M%p
获得晚上8:00的时间。有关详细信息,请参阅和。

您可以将格式放入locallang文件中。在那里,可以更改与该语言相关的格式

<f:format.date format="{f:translate(key:'dateFormat')}">{newsItem.eventEnd}</f:format.date>
{newsItem.eventEnd}

当我使用
format=“{f:translate(key:'dateFormat')}”时,
以m/d/Y的形式返回日期。{f:translate(key:'dateFormat')}返回“%m/%d/%Y”,无论我在locallang中写什么。我尝试在我的项目文件夹中搜索“%m/%d/%Y”,认为我的locallang可能会被某些内容覆盖,但没有。我的locallang.xlf中包含以下内容:
m/d/Y h:I A
my de.locallang.xlf:
m/d/Y h:I A d.m.Y h:I A
我在TYPO3后端更新了我的德语包,也是“目标”我的locallang中缺少参数。泰!