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

(10 RC4) Package language files only being loaded on root level #12521

Closed
patrickdemooij9 opened this issue Jun 1, 2022 · 1 comment · Fixed by #12543
Closed

(10 RC4) Package language files only being loaded on root level #12521

patrickdemooij9 opened this issue Jun 1, 2022 · 1 comment · Fixed by #12543

Comments

@patrickdemooij9
Copy link
Contributor

Which exact Umbraco version are you using? For example: 9.0.1 - don't just write v9

10 RC4

Bug summary

Somewhere in the changes for v10 there has been a change where only the language files in the folder 'lang' at your package root will be loaded.
I get the change, but this messes up with the way that I am currently doing the labels in SeoToolkit. In SeoToolkit, each functionality is its own package, but there exists a package that combines all the functionalities in one. Each functionality has its own language file, but all the package content files all live under a App_Plugins/SeoToolkit folder.
So with my structure, it goes like: App_Plugins/SeoToolkit/[Functionality]/lang/en-us.xml. Which now doesn't get picked up anymore. This did used to work in v9.

I also tried using this snippet of code:
builder.Services.AddTransient(sp => { var webhostEnvironment = sp.GetRequiredService<IWebHostEnvironment>(); return new LocalizedTextServiceSupplementaryFileSource(new FileInfo(webhostEnvironment.ContentRootFileProvider.GetFileInfo("/App_Plugins/SeoToolkit/ScriptManager/lang/en-us.xml").PhysicalPath), true).AsEnumerableOfOne(); });

Which worked great until I added another one of them in the project. Then it just removes the other one and it is basically fighting for a spot.

Specifics

No response

Steps to reproduce

Place a en-us.xml language file in /App_Plugins/[PackageName]/Something/lang

Expected result / actual result

Would love to have a way to fix this. I get the reason for changing it to only the root level, but then please provide a way to work around it. And at least mark this as a breaking change for other package developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants