[TYPO3-mvc] Month translation into German

Tim Schoch | GSTALTIG tim.schoch at gstaltig.ch
Mon Oct 17 09:04:14 CEST 2011


I have the same problem, that the default php functions dont return the correct labels in all cases.
Therefor I use the translation viewhelper and write the monthes into your locallang.xml.

<f:translate key="month.1" />

Wheras the 1 could be done fetched with the datetime formatter, or in some cases, provided by the controller as a var.

Tim


  _____  

From: Rayuth You [mailto:rayuth at web-essentials.asia]
To: typo3-project-typo3v4mvc at lists.typo3.org
Sent: Mon, 17 Oct 2011 05:24:44 +0200
Subject: [TYPO3-mvc]  Month translation into German

Hi list
  
  By render month from controller to view (BE module), I got the months in 
  English.
  When I switch to German these month is still in English.
  I want to translate these months when I switch language into German.
  
  The month:
  foreach (range(1,12) as $i) {
   $month[$i] = strftime('%B', mktime(0, 0, 0, $i));
  }
  
  Is it possible to do that? Or any hint?
  
  Thanks,
  Yuth
  _______________________________________________
  TYPO3-project-typo3v4mvc mailing list
  TYPO3-project-typo3v4mvc at lists.typo3.org
  http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
    


More information about the TYPO3-project-typo3v4mvc mailing list