Project

General

Profile

Actions

Feature #47172

closed

Permit custom locations for localization files (XLIFF file handling in llXmlAutoFileName)

Added by Joschi Kuphal about 11 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2013-04-12
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Currently, when working with XLIFF localization files, the method \TYPO3\CMS\Core\Utility\GeneralUtility::llXmlAutoFileName() is used for determining the names of localization files other than the default language. Unfortunately the method restricts the valid locations for such files to the following directories:

  • typo3/sysext/
  • typo3/ext/
  • typo3conf/ext/
  • tests/
  • (typo3_src/tests/)

In other words: Localization files are assumed to reside inside an extension (none of our installations has the test folder, so ...). While I don't understand the need to restrict the valid locations for localization files in general (anyone? do they any harm?), there exist some extensions (like e.g. formhandler) that encourage / require you to use custom localization files. However, as described above, the llXmlAutoFileName() prevents you from putting localization files into any other directory than the listed ones while using a format relying on automatic file name determination (= XLIFF, although the method name *llXml*AutoFileName suggests that the old llXML format might be affected as well) at the same time. My personal choice for files like this would definitely be the fileadmin directory ... In any case, both

  • creating an extension just for putting localization files into it as well as
  • dismissing the XLIFF format just for the sake of the above restrictions

don't seem viable options to me. Currently, if you want to use custom localization files inside / below e.g. the fileadmin folder, you're stuck to the old llXML format, carrying mutliple languages in one single file. I surely don't have to elaborate on the disadvantages of this pretty oldschool approach ... (Btw. I'm not absolutely sure, but as far as I know these restrictions also apply to the f:translate viewhelper within fluid templates, again in conjunction with custom language files, which is quite a common use case for us. bummer as well ...)

I suggest the llXmlAutoFileName() to be adapted in a way that either

  • at least one fixed, neutral folder is being considered an additional valid location for localization files (e.g. the fileadmin directory, as assumed in the attached patch), or
  • that one or even more such folders can be defined by the integrator (e.g. via the install tool), or
  • that the restriction is dropped completely (if there are e.g. no security concerns).

Finally, this feature request seems somehow related to #34728.


Files

llXmlAutoFileName.patch (516 Bytes) llXmlAutoFileName.patch Example for permitting localization files in fileadmin folder Joschi Kuphal, 2013-04-12 22:19

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #65273: Using XLIFF translation files located in non-extension folders does not workClosedMarkus Klein2015-02-24

Actions
Actions #1

Updated by Ingo Kasch over 10 years ago

Just wanted to draw attention to this issue again. I'm currently working on a project using the most recent TYPO3 6.1.3 and this issue is still present. In my case I use XLIFF localization files in an extension, which are located in the "fileadmin" folder (Exactly the usecase descripted in the initial post).

After applying the attached patch everything is working as expected.

Actions #2

Updated by Mathias Schreiber about 9 years ago

  • Target version set to 7.4 (Backend)
Actions #3

Updated by Mathias Schreiber about 9 years ago

  • Category set to Localization
Actions #4

Updated by Mathias Schreiber about 9 years ago

  • Target version changed from 7.4 (Backend) to 7.2 (Frontend)
Actions #5

Updated by Markus Klein about 9 years ago

  • Status changed from New to Closed
  • Target version deleted (7.2 (Frontend))

Closing this as duplicate/related to #65273.
Please continue any discussion there.

Actions

Also available in: Atom PDF