You are here

function example_locale_context in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/tests/old/samples/example.module \example_locale_context()

File

coder_upgrade/tests/old/samples/example.module, line 2564

Code

function example_locale_context() {

  // () -- Change the next line but leave this alone
  // Translate to German.
  t('Welcome to our site', array(), 'de');

  // Translate to German with replacement.
  t('!user, welcome to our site', array(
    '!user' => theme('username', $user),
  ), 'de');

  // Translate May in the long version to current page language.
  t('!long-month-name May');

  // Translate May in the short version to current page language.
  t('May');

  // Translate May in the long version to German.
  t('!long-month-name May', array(), 'de');

  // Translate May in the short version to German.
  t('May', array(), 'de');
  $output = format_plural($node->comment_count, '1 comment', '@count comments', array(), 'de');
}