You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The item_id really can't be customizable, as it's not necessary. This field is rigidly bound to a specific record of the main table and has a mapping to the locale field, which together are included in a composite unique index.
The locale field also cannot be customized because it belongs to a specific localization.
The query includes the condition where locale in (zh_CN, en) because your application is requesting a Chinese localization and, in case a translation is not available, it will get an English translation. The models.filter.enabled parameter of the config/localization.php config file is responsible for this filtering. If you turn it off, the query will return all created localizations.
Also, if you need to get a translation for a localization other than main or fallback, pass the localization as the second argument to the getTranslation method in one of the ways. For example:
Otherwise, the translation for the currently active localization will be returned by default, and if this translation is not in the database, then the fallback will be returned.
Feature description
When using
$video->getTranslation("title")
to get the title, the final SQL generated is:Reading the source code, I found that
locale
anditem_id
cannot be customizedThe text was updated successfully, but these errors were encountered: