Skip to main content

drupal module: Twig Field Value

drupal theme 开发时经常会用到某个字段,而不是整个内容,Twig Field Value 就可以简单实现了。

 

用法:

Single field value

<strong>{{ content.field_name|field_label }}</strong>: {{ content.field_name|field_value }}

Multiple field values

<strong>{{ content.field_name|field_label }}</strong>: {{ content.field_name|field_value|safe_join(', ') }}

Single field properties

"生肖” 用英语怎么说

春节到了,新的一年(阴历年)开始了,按照生肖算,猪年开始了。可是,如今向老外讲什么是“生肖”比登天还难。绕了半天弯儿,越讲他越糊涂。别急,下面这段文字或许能帮您解燃眉之急。
It is said Buddha (the ultimate Emperor for the whole universe in Chinese legend) once called together all the animals on the earth for an important meeting. Only twelve animals turned up: the rat, the ox, the tiger, the rabbit, the dragon, the snake, the horse, the sheep, the monkey, the rooster, the dog and the pig. The rat, being the smartest, jumped on top of the ox to be the first one to arrive.

“春晚” 用英语怎么说

2007年央视春晚是全中国老百姓不可或缺的大餐。看下面这段新闻,瞧瞧如何用英语表达“春晚”?

Performers were crossing their fingers going into the penultimate dress rehearsal of the CCTV Spring Festival Gala on Tuesday. With the festival eve looming, nerves are starting to strain. 

As the most prestigious showcase for China's top performers, the Spring Festival Gala has no shortage of established acts queueing up to appear. But the gala always reserves some spots for the unknowns and the up-and-coming to make their national breakthroughs. 

报道说,本周二,07央视春晚迎来了第五次联排,这也是春晚倒数第二次联合彩排。

“站票” 用英语怎么说?

春运回家,一票难求。对普通老百姓而言,最没办法的办法就是抢购一张“站票”了。“站票”怎么说?看看下面这篇题为“Track of my tears”(《辛酸的旅程》)的新闻报道:

Migrant workers, employees working outside their hometowns and students are the main body of passengers during Spring Festival.

Students and migrant workers are generally distributed in the cheaper hard-seat coaches, crowded with people who bought the standing-room tickets. These passengers stand, sit or even lie on the isle. Many take children with them.

报道说,春节返乡,学生和民工一般购买低价的硬座票,而硬座车厢里又挤满了只有站票的无座乘客。

“预期寿命” 用英语怎么说

到2050年,中国人均预期寿命可以达到85岁,这是日前由中科院提出的未来几十年我国可持续发展战略目标之一。专家们同时指出,到2050年,全国人均受教育的年限将从现在的8.2年提升到14年以上。

请看外电相关报道:Average life expectancy in China will jump 13 years to 85 years and all households will be lifted out of poverty by the middle of the century, Chinese academics forecast in a report.

The number of years a Chinese child spends in school will almost double to 14 years and an increasingly affluent population will spend a far smaller proportion of their income on food.

“低保” 用英语怎么说

“老吾老,以及人之老;幼吾幼,以及人之幼。” 孟子倡导的“仁爱”精神,是中华文化的根本。2006年岁末,中国政府一“仁政”举措是 —— 明年将在全国范围内建立农村最低生活保障制度。这也是维护最广大人民群众利益的最直接的体现。

请看《中国日报》相关报道:For the first time the country's entire rural residents living in abject poverty can expect the State to cover their subsistence allowances, thanks to the government's latest move to narrow the disparities between cities and rural areas.

由报道可知,“subsistence allowance”指的是“最低生活保障”,即我们常说的“低保”。相应地,“低保制度”就是“subsistence allowance system”。

“Subsistence”源于动词“subsist”,指“维持生计”、“(勉强)度日”,如to subsist on charity(靠人施舍维持生计)、to subsist by begging(靠乞讨度日)。

“国库、小金库” 用英语怎么说

外汇储备作为一个国家金融实力的标志,是充实国库、稳定本国汇率的物质基础。但是,外汇储备增长过快、规模过高也会给经济带来很多不利影响。针对目前外汇储备充实国库的现状,央行提出了三项解决措施:不再“宽进严出”、变“藏汇于国”为“藏汇于民”、鼓励企业“走出去”。

请看《中国日报》的相关报道:China has noticed the negative impacts brought by its huge foreign exchange reserves, at more than US$870 billion, and is taking steps to relieve the pressure.

The State Administration of Foreign Exchange has started to free up the country's foreign exchange regime with a shift from stockpiling foreign exchange reserves in State coffers to letting businesses and individuals hold more foreign currency.

“福利彩票” 用英语怎么说

法国人曾这么描述“福利彩票”:政府发行彩票是向公众推销机会和希望,公众认购彩票则是微笑纳税。据悉,去年中国福利彩票共销售约495亿多元人民币,筹集福彩公益金170多亿元。其中,公益金除部分上缴国家财政外,全部用于社会福利事业。

请看《中国日报》相关报道:The sale of China Welfare Lottery, the only national lottery approved by the Chinese government, hit a record high of 49.5 billion yuan (6.2 billion U.S. dollars) in 2006, up 20 percent from the previous year

Half of the money has been turned over to the coffer of the central government. The remaining funds were used for social welfare purposes.

由报道可知,“福利彩票”可用“welfare lottery”来表达,其主要用于国家的“charitable causes”(慈善事业)。