Here is an example to select entities by the current language in EntityFieldQuery.
// Get the current language
global $language;
// Setup the EntityFieldQuery
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node')
->entityCondition('bundle', '<CONTENT TYPE>') // ex. article
->propertyCondition('status', 1) // published nodes
->propertyCondition('language', $language->language, '='); // filter by current language
// Execute the query
$result = $query->execute();
Pathauto is the most common module which i think almost all Drupal websites use it to format the path alias. Sometime we want to use the node title as part of the path alias but if we are working on multilingual Drupal website, this may lead to non english URL.
So we have the Transliteration module to solve the problem. It takes Unicode text and tries to represent it in US-ASCII characters by attempting to transliterate the pronunciation expressed by the text in some other writing system to Roman letters. In addition, it also helps creating clean file name on file upload.
The Edit module allows you to edit the node content directly on the node view page. It works with CKEditor and also it will be included in the Drupal 8 core. So see how it works in Drupal 7 first.
1. Drupal 7 >= 7.22 is required.
2. Download and install the CKEditor and Edit modules.
By default, the scrollbar is hidden if the content doesn’t exceed the content wrapper height. So if you have dynamic content, you have to tell the NiceScroll plugin to resize otherwise the scrollbar doesn’t show.
至於電視台記者被毆,可不可以這樣看(Why not put it this way):香港的免費電視新聞台,愛國親中,早已調整了凡事不可以「西方觀點報道」的偏頗立場。他們認為,許多新聞,應該多從中國人的觀點來報道評論,這樣才會免於被英美的CNN和路透社洗腦。 Continue reading 陶傑 – 家法制裁→