]> source.dussan.org Git - nextcloud-server.git/commit
Add L10n factory method for generic language heuristics 29015/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Fri, 1 Oct 2021 07:56:01 +0000 (09:56 +0200)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Wed, 13 Oct 2021 07:57:21 +0000 (09:57 +0200)
commit5b727fc7da346ce0b33905ac54114102ffa16f13
tree17b4f223f67f734e66902344a391e1c9f74eb613
parent5b7764354c71f79b83394796cb947fef92dfd830
Add L10n factory method for generic language heuristics

The existing `findLanguage` method tries its best to find the best
language for the current users. For some tasks we don't want this but
rather determine the most generic language for *another* user, e.g. when
the current user trigger an email notifiaction to someone else. In this
case the current user's language is a bad guess in many multi-language
environments.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
lib/private/L10N/Factory.php
lib/public/L10N/IFactory.php
tests/lib/L10N/FactoryTest.php