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

Language aware content / file(s) #32

Open
joho1968 opened this issue Mar 20, 2023 · 4 comments
Open

Language aware content / file(s) #32

joho1968 opened this issue Mar 20, 2023 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@joho1968
Copy link

joho1968 commented Mar 20, 2023

It'd be nice if the plugin could support a multi lingual situation.

Perhaps filename.md being the default, and then look for filename_lang_locale.md (based on the user's locale) and use if found.

So, for a user with the Swedish language and Swedish locale settings filename_sv_SE.md would be used. If no such file exist, filename.md is used.

Since you can set language and locale independently of each other in NC, you'd need both.

Just a thought.

@julien-nc julien-nc added enhancement New feature or request good first issue Good for newcomers labels Mar 20, 2023
@julien-nc
Copy link
Member

Thanks for the suggestion. This could indeed be very nice.

So the localized files would need to be in the same directory than the main file.

I would consider merging this if someone would like to implement it!

@joho1968
Copy link
Author

So the localized files would need to be in the same directory than the main file.

Yeah, I think that'd keep configuration to a minimum.

I would consider merging this if someone would like to implement it!

I don't have any experience with Nextcloud apps (yet), but I'll be happy to take a look at it.

@joho1968
Copy link
Author

Trying to navigate around the Nextcloud API, etc (which, IMHO, has some serious documentation blackouts 🙄), I find differences between your app and their sample Dashboard Widget in their new tutorials.

You have class WelcomeWidget implements IWidget, they have class SimpleWidget implements IAPIWidget. But maybe that's just me not understanding things 😎

What I'm somewhat confused about is how to get the current user's language and locale in your FileService.php and where it should be passed from/called on.

@joho1968
Copy link
Author

I would consider merging this if someone would like to implement it!

Done 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants