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

i18n/gi18n:Add GetAllContent Method to i18n Component #4179

Closed
Jerry-fmcheng opened this issue Mar 3, 2025 · 0 comments
Closed

i18n/gi18n:Add GetAllContent Method to i18n Component #4179

Jerry-fmcheng opened this issue Mar 3, 2025 · 0 comments

Comments

@Jerry-fmcheng
Copy link

Is your feature request related to a problem?

Option No

Describe the solution you'd like

Problem Statement
Currently, the i18n component in GoFrame provides the GetContent method, which retrieves the translation for a specific key. However, there is no built-in method to retrieve all translations for a given language. This functionality is essential in scenarios where developers need to:

Export all translations for a specific language.
Debug or validate the completeness of translations.
Programmatically process or manipulate all translations.

Proposed Solution
Add a GetAllContent method to the i18n component, which would return all translations for a specified language as a map[string]string (where the key is the translation key and the value is the translated content).

Proposed Method Signature
func (m *Manager) GetAllContent(ctx context.Context) (map[string]string)

Describe alternatives you've considered

This feature would be backward-compatible and would not impact existing functionality

Additional

No response

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant