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
That doesn't work when I choose non-English language in a client. I know there's matched record in database and can fetch it using News.find({ 'i18n.ru.title': title }).
Does i18nFind support this anyway? Maybe I'm just doing something wrong?
The text was updated successfully, but these errors were encountered:
imajus
changed the title
Collection.i18nFind querty containing translated field
Collection.i18nFind query with translated field
Apr 3, 2016
As you can see I don't use translated field in search query anymore but for sorting option on client only. I bet if you find out how to get current language inside TAPi18n.publish you'll be able to use the same for your search query.
// serverTAPi18n.publish('Entries.byTitle',function(title){constlang='en';//FIXME: maybe this.lang? the latest function argument? something else? must be available somehowconstquery=lang=='en' ? { title } : {[`i18n.${lang}.title`]: title};returnEntries.i18nFind(query);});
I'm trying to fetch some records using
i18nFind
using translated field in a query, like so:That doesn't work when I choose non-English language in a client. I know there's matched record in database and can fetch it using
News.find({ 'i18n.ru.title': title })
.Does
i18nFind
support this anyway? Maybe I'm just doing something wrong?The text was updated successfully, but these errors were encountered: