Query by language

I am using the updated .Net Core library available from: https://github.com/asido/csharp-kit (added to my project via NuGet).

I can get my documents, however as soon as I try to get an alternate language it all falls apart. There is not a single example for this newer library, and I am tearing my hair out.

Does anybody have a nice, simple example showing how to set the language with this library?

Right now I have this:

prismic.Form.SearchForm searchForm = context.Form(“everything”).Ref(context.Master).Query(new Predicate(“at”, “document.id”, documentId))

context is a prismic.Api object, documentId is the ID of an alternate language for a document.

I know this is going to end up as an insanely simple solution, but I am at my wits end right now.

Any help will be very much appreciated!

1 Like

So all technical support is now done by this community forum, great :frowning: Please Prismic, go back to providing actual support.

Had to work this one out myself as the documentation is in no way complete (it’s hardly even started), in the end just needed to add a call to “Set” at the end. So the line:

prismic.Form.SearchForm searchForm = context.Form(“everything”).Ref(context.Master).Query(new Predicate(“at”, “document.id”, documentId));


Form.SearchForm searchForm = context.Form(“everything”).Ref(context.Master).Query(new Predicate(“at”, “document.id”, documentId)).Set(“lang”, language);

Almost two weeks of mucking about because this is not obviously logical, no support and no documentation.

Hi Steve,

My apologies, I should have got back to you on this sooner. This is a community created kit not maintained by us here at Prismic which is why we have no documentation for it and I honestly didn’t have an answer to your question. I was hoping someone from the community would be able to help with this one.

I should have tracked this better and gave a response when no answer appeared.

I’m glad you found your answer in the end though and I hope this doesn’t sour your experience too much. We try to be as responsive as possible here and will try our best not to let this happen again.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Re-opened on user request.

@steve.jackson I know it's a bit late but if you are looking for help with .NET specifically with using prismic with .NET core I'd be happy to help.

I maintain the prismic .NETstandard library that I've ported under the guidance of the prismic team. https://www.nuget.org/packages/prismicio.netstandard/

It's got some additions that make it more idomatic for .NET Core.

I'd be happy to lend a hand where I can and I'll ensure I improve the Docs too.

This issue has been closed due to inactivity.