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

Add new method to languagesManager to show all string of a language #597

Closed
anonymous-matomo-user opened this issue Mar 10, 2009 · 7 comments
Labels
Critical Indicates the severity of an issue is very critical and the issue has a very high priority. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

Add a new method to languagesManager to provide all string of a language.

@robocoder
Copy link
Contributor

What’s the use case?

A plugin should already be able to access all the strings stored in the $translations array.

@anonymous-matomo-user
Copy link
Author

Yes, I’m sorry, I wasn’t clear enough.

I would like to have access all the strings from API via the LanguagesManager Module.

For example, call API LanguagesManager.getAvailableLanguageString(languageCode)
and it will return all the strings of the language (in xml, ….).

All that, to reuse the translators’s works in other projects (in my case DWA application [http://www.desktop-web-analytics.com]).

Thanks

@anonymous-matomo-user
Copy link
Author

I just add the new method and send the file in attachment.

@robocoder
Copy link
Contributor

Can you add a test case (tests/core/LanguagesManager.test.php doesn’t yet exist) at least for the new method you created, and rename the method as: getTranslationsForLanguage() ?

@anonymous-matomo-user
Copy link
Author

Attachment: Rename method to getTranslationsForLanguage()
[API.php](http://issues.piwik.org/attachments/597/API.php)

@anonymous-matomo-user
Copy link
Author

Attachment: I create a test case, but I don’t know if it’s correct
[LanguagesManager.test.php](http://issues.piwik.org/attachments/597/LanguagesManager.test.php)

@mattab
Copy link
Member

mattab commented Mar 23, 2009

(In 1001) – fixed #597 Add new method to languagesManager to show all string of a language
ps: renamed from getTranslationsForLanguages to getTranslationsForLanguage
patch by benoit pouzet

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical Indicates the severity of an issue is very critical and the issue has a very high priority. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

3 participants