2
votes

I was searched and read many websites but can't find how to set up drupal multi language website.

I want to use 2 languages in a site.

These 2 languages have different content. (not content translation).

I had enabled Locale module, enabled multilingual support in each content type

but when i was added content in 2 languages

the front page list all of those articles without filter the site's language.

how to setup drupal 7 to list articles with filtered language.

eg: http://example.com/en <- this url should list all english article. http://example.com/fr <- this url should list all france article.

3

3 Answers

2
votes

I have to install i18n or Internationalization module from Drupal contributed modules and enabled these option.

  • Multilingual select
  • Internationalization

** This module require Variable module.

0
votes

Since the content is different, one way to achieve this is by creating two different content types. Assign an alias pattern to each content type like en/[node:title] and fr/[node:title]. You can then display each or both content types on any page; it could be a taxonomy page with alias en or fr. If you choose this method you won't need locale. This one is not intended for translated sites where each content has a matching translated content.

0
votes

If you also want to expand some special words which have not include in language lib, you can try following code:

$zh = variable_get('locale_custom_strings_zh-hans');//zh-hans is your language key.
$zh["More news"] = '更多信息'; //  KEY/VALUE
variable_set('locale_custom_strings_zh-hans',$zh); // set it back.