Since 3.2 the DocumentReference supports specifying the Locale of the document.
However, it seems that the platform completely ignores this feature and does not distinguish between 2 document references with different locales. Some examples:
- store returns the same document for references with different locales
- store returns documents with references having no locales set, even for translated document versions
- XWikiDocument constructor does not set the document language based on the locale
- XWikiDocument language setter ignores the reference's locale, basically creating a conflict (if Locale would be used
My conclusion ATM is that this feature is unreliable and pretty much unusable. It is very likely to cause more confusion in the future if we don`t either implement it or remove it completely.