You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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
The text was updated successfully, but these errors were encountered: