Doctrine 1
  1. Doctrine 1
  2. DC-404

Allow custom language field name in I18n Behavior

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1, 1.2.2
    • Fix Version/s: 1.2.2
    • Component/s: Behaviors, I18n
    • Labels:
      None

      Description

      I18n behavior assumes language field name of 'lang'. It would be nice if this was configurable.

      This was mentioned and a proposed solution was given here: http://forum.symfony-project.org/index.php/m/85623/

      I've attached a patch which implements this solution, it essentially adds an i18nField option to the behaviour. The field defaults to 'lang'.

      The patch was made against r7016 of the 1.2 branch.

      Note:

      • Leaving the field name as 'lang' does not cause unit test failures.
      • Changing the name of the field does cause some unit tests to fail for me. I'm not sure if the dependency on the field name exists in the unit tests or in the doctrine library itself. If dependencies exist in the library, this patch may not be sufficient to add the feature.

      Sorry if the patch is incomplete, I'm new to Doctrine in general.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Steve Lounsbury
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: