SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.23k stars 992 forks source link

SharePoint Framework interactivity with SharePoint multilingual pages #7488

Closed juliemturner closed 5 months ago

juliemturner commented 2 years ago

What type of issue is this?

other

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Target SharePoint environment

SharePoint Online

What browser(s) / client(s) have you tested

Additional environment details

Issue description

Currently when you build a multilingual page in SharePoint and create translations all first party web parts honor the language of the page and override the user's current language preference. The SharePoint Framework for 3rd party developers has no straightforward way to accomplish this same thing.

Ideally the context would include an additional property that would surface some of the hidden page properties for multilingual pages like _SPTranslationLanguage so that localization of the web part could work off that value in the cases where an SPFx web part is put on a multilingual page. For instance, if there was an additional property here something like pageLanguage. If in addition if there is a page language it could also affect localization like the currentUICultureName does, that would be even better. The long and the short of it is that it's very confusing to users, and nearly impossible to explain to them why 3rd party web parts on multilingual pages do not honor the translation language. There is obviously api calls we could make to get the data and then build a separate implementation of the localization to honor it but that's undesirable.

MicrosoftTeams-image

ghost commented 2 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

johnguy0 commented 5 months ago

Thank you for opening this issue. Closing since this is not an issue directly with SPFx, but we have opened a bug for the product team.

ghost commented 5 months ago

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues