forked from chaddro/EasyPopulate-4.0
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support import/export with language_code (en, de, etc....)
Fixes #43 Support export with language code Export language dependent data as a field to include the language code suffix (ie. english => `en`, german => `de`, etc...), the language id suffix (ie. english => 1, german => 2, etc...), or both fields. Currently the export uses the language_id which is a number associated with the specific database as the suffix for fields that are language based (ie. category_description, product_description, etc...). Use of the language code will make data transfer/matching more universal with the existing database and other databases. Added a define value into `includes/modules/easypopulate_4_filelayout.php` to support the export of language fields to have the language code (ie. english => `en`, german => `de`, etc...) Define established is: `EASYPOPULATE_4_CONFIG_LANGUAGE_EXPORT` with expectation of at least three options: `id`, `code`, `all` where `all` will export language based fields with at least currently the language id number and the language code to where the two fields will be adjacent to each other and are expected to contain the same information on export. The file contains a define if one has not been set (expected to be set through the install/upgrade process to be in the database) to default to the "old" method of using the language id number as the suffix. Also if the setting is not `code` then the "default" will be used. If a fourth option is added to the list then this particular arrangement may need to be revisited. (ie. what if a third language field were added to the mix, then there would need to be an option to export just that third field, and three additional options to export that field combined with the other existing two and one for the existing two to be exported alone as well, though it would simply make more programming sense to either export a single field or all fields and then the additional fields removed and/or import to be controlled to allow one or the other, but shouldn't allow a combination of language characteristics unless the goal is to change the language assignment data. With the changes that have been made to the export file, having `EASYPOPULATE_4_CONFIG_LANGUAGE_EXPORT` set to any of the above three options will result in the export file containing whatever has been chosen/set or if it is not set to one of the three values to export the fields using the language id as the suffix. Added the configuration option to support "setup" and control of the export language suffix for fields that are language dependent.
- Loading branch information
1 parent
c70d69c
commit 857eb98
Showing
4 changed files
with
529 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.