Skip to content

Find solution for explicit localization when using the document manager #623

@dantleech

Description

@dantleech

The document manager currently has one localization aware method - findTranslation, which is the localized analogue of find There does not exist an analogue for ``findMany` and the query builder does not support localizing results.

Other methods that could be localized:

  • getReferrers
  • getReference (?)
  • getChildren
  • getDocumentsByPhpcrQuery

Repository classes also have methods which could be localized.

Possible solutions

  • Do nothing and deprecate findTranslation: The user must change global state by changing the locale of the locale chooser.
  • Make the DocumentManager localizable through a localize method which returns a localized clone of the DocumentManager.
  • Add explicit translated methods: getTranslatedReferrers, findTranslatedMany
  • Add additional, optional, $locale argument to all existing localizable methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions