Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting the localized name of a TermSet is not possible #1188

Closed
1 task done
JuergenRB opened this issue May 24, 2023 · 3 comments
Closed
1 task done

Setting the localized name of a TermSet is not possible #1188

JuergenRB opened this issue May 24, 2023 · 3 comments
Assignees
Labels
area: model 📐 Related to the core SDK models bug Something isn't working

Comments

@JuergenRB
Copy link

Category

  • Bug

Describe the bug

The documentation describes how to set the LocalizedName of a TermSet.
However, the example does not work because the TermSetLocalizedNameCollection class is internal.

image

Steps to reproduce

Proceed as described in the documentation

// Add a new localized label for the term set
(termSet.LocalizedNames as TermSetLocalizedNameCollection).Add(new TermSetLocalizedName() { LanguageTag = "nl-NL", Name = "Dutch name" });
// Send the updates to the server
await termSet.UpdateAsync();

Expected behavior

The example from the documentation works or there is another possibility to set the LocalizedNames of the TermSets.

@jansenbe jansenbe self-assigned this May 25, 2023
@jansenbe jansenbe added question Further information is requested area: model 📐 Related to the core SDK models bug Something isn't working and removed question Further information is requested labels May 25, 2023
@jansenbe
Copy link
Contributor

@JuergenRB : thanks for using PnP Core SDK and reporting this @JuergenRB , our test projects can see "internals", this indeed needs to be fixed.

@jansenbe
Copy link
Contributor

@JuergenRB : I've just pushed a fix, when you test with our nightly build tomorrow you can use following approach:

// Update termset 
termSet.Description = "updated description";
termSet.AddLocalizedName("Dutch name", "nl-NL");
await termSet.UpdateAsync();

@jansenbe
Copy link
Contributor

@JuergenRB : I'm closing this one already, feel free to re-open or create a new issue in case the problem is still not resolved for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: model 📐 Related to the core SDK models bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants