0
votes

I have a multilingual DNN with a multilingual, custom made, 2sxc app for listing out careers. The site and app are in English and French.

The app has a listing template, and a details template. When a person lands on the page, it shows the listing of careers in a grid. Each career has a variety of fields but the important ones to know are that it has a Title (a simple text string) and a URL (url-part field).

On the listing page, I have a link to each details view that looks like this:

<a href="@(Dnn.Tab.FullUrl + "/" + @App.Resources.CareerLabel.ToLower() + "/" + career.urlkey)">

The user clicks on this link and then they're brought to a URL that looks like this: /en-ca/students/think/career/veterinarian

The "/career/" part is a query string and I have a simple visual query set up so that the details view filters on this. It's a pretty standard set up for a listing and details.

enter image description here

I want to be able to make this article also translated into French, including the URL, so when I translate it, it should look like this:

/fr-ca/eleves/pense/career/veterinaire

The issue I'm running into is this: I have created my English articles. But when I translate the article into French, including the URL field, the article doesn't seem to display.

In my _details.cshtml template, I have:

@if (Content != null) { //show the details } else { // the career can't be found }

For some reason, when I go to French and I click on a career in the listing, the url shows /fr-ca/eleves/pense/career/veterinaire but then the details view shows the "Career can't be found" part of my details template as if the content is null.

1
I'm starting to suspect that my issues arise from the fact that my multilingual DNN site started out as EN-US, then I added EN-CA and EN-FR and then removed EN-US and set EN-CA as the primary. So it seems that I'm running into issues where the default language is not available so I'm having to resave each individual field to set the language as EN-CA. Is there any way around this?Aaron - Wolf X Machina
This post is related and I believe it's the same issue: github.com/2sic/2sxc/issues/2244Aaron - Wolf X Machina

1 Answers

1
votes

There has been some progress on this, maybe the answer is already obsolete...

  1. Previously the ValueFilter only respected the primary language, so you couldn't use url-keys from second languages
  2. It has now been added as a feature - the settiongs of the ValueFilter can now optionally also take the current language into consideration. See https://github.com/2sic/2sxc/issues/2244