View Issue Details

IDProjectCategoryView StatusLast Update
0002840OXID eShop (all versions)4.06. Language and translationspublic2011-08-18 08:58
Reporterrrosendahl 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.5.0 revision 34568 
Target VersionFixed in Version4.5.2 revision 38481 
Summary0002840: Multilang fields in non-standard tables (e.g. in custom tables)
DescriptionIt is currently not possible to define own database tables with multilang fields:

The multilang table names are returned by the getMultilangTables() function in oxfunctions.php and this value is used directly in oxShop::generateViews().
This makes it impossible to use multilanguage fields when writing modules, without the shop owner having to edit the modules/functions.php file for every module that provides tables with multilanguage fields.

One way to solve this might be to move the getMultilangTables() call in the oxShop class into a separate (protected) method, so that it can be overriden by a module, adding additional table names to the result. You might also consider putting the "$this->getConfig()->getConfigParam( 'aMultiShopTables' )" call into a protected getter in oxShop, so that both the multilang and multishop tables can be extended by overriding the oxShop class by modules.

In addition to that, the oxfunctions.php getViewName() function also fetches the multilang table names directly from the getMultilangTables() function, so oxShop isn't the only place that would need changing.
Steps To ReproduceCreate a custom database table with multilang fields (e.g. data, data_1, data_2, data_3). No language views are created for this table and the multilang fields will thus not be used when switching languages in the frontend.
TagsNo tags attached.
Theme
BrowserAll
PHP Versionany
Database Versionany

Activities

birute_meilutyte

2011-05-09 09:06

reporter   ~0004513

@developers: check from source code side if such issue still exist

Linas Kukulskis

2011-08-18 08:58

reporter   ~0005053

getMultilangTables moved to oxlang class
also added config parameter $this->aMultiLangTables = null; this is array where you can define multi-language tables also.