home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
Plugin config order and language file strings within the plugin
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Lightning303" data-source="post: 1107120" data-attributes="member: 97876"><p>Hey,</p><p>i have 2 small questions.</p><p></p><p>Question 1:</p><p>I added AtmoLight to the config/settings menu in MP2 a while ago, but what always bugged me was that the menu items are sorted alphabetically. The entries themselfs are sorted in the way i added them into the plugin.xml but not the menu items. And it makes it way harder to navigate in my opinion.</p><p>A screenshot of how it looks like:</p><p></p><p>[ATTACH=full]156929[/ATTACH]</p><p></p><p>However i would like it to be sorted like this:</p><p>General Settings</p><p>AtmoWin</p><p>Hyperion</p><p>Content Effects</p><p>Remote Buttons</p><p>Advanced Settings.</p><p></p><p>plugin.xml section: <a href="https://github.com/ambilight-4-mediaportal/AtmoLight/blob/DEV_rework_core/AtmoLight.MediaPortal2/plugin.xml#L38-L79" target="_blank">https://github.com/ambilight-4-mediaportal/AtmoLight/blob/DEV_rework_core/AtmoLight.MediaPortal2/plugin.xml#L38-L79</a></p><p></p><p>Is it possible to change the order? If so how? If not, any plans to add the possiblity (pretty please)?</p><p></p><p></p><p><s>Question 2:</s></p><p><s>Is it possible to get the strings from the language files within the plugin, so i can work with them?</s></p><p><s></s></p><p><s>I have this string in the file:</s></p><p><s>[code]<string name="AtmoLight.AtmoWinConnectionLost">Connection to [Target] lost!</string>[/code]</s></p><p><s></s></p><p><s>And i want to notify the user. However i would like to replace [Target] with something else within the plugin.</s></p><p><s>Atm im doing this:</s></p><p><s></s></p><p><s>[code] ServiceRegistration.Get<INotificationService>().EnqueueNotification(NotificationType.Error, "[AtmoLight.Name]", "[AtmoLight.AtmoWinConnectionLost]", true);</s></p><p><s>[/code]</s></p><p><s></s></p><p><s>Which of course tells me that connection to "[Target]" got lost and not to e.g. AtmoWin.</s></p><p><s>Any method around that returns the string?</s></p><p><s>E.g.</s></p><p><s>GetStringFromLanguage("[AtmoLight.AtmoWinConnectionLost]") returns "Connection to [Target] lost!"</s></p><p><s></s></p><p>Edit: As soon as i posted this and went to the kitchen to make something to eat i of course knew how i get the answer to question 2 myself... <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" /></p><p></p><p>For everbody else curious:</p><p>[code]MediaPortal.Common.Localization.LocalizationHelper.Translate("[AtmoLight.AtmoWinConnectionLost]")[/code]</p><p></p><p>Thanks!</p></blockquote><p></p>
[QUOTE="Lightning303, post: 1107120, member: 97876"] Hey, i have 2 small questions. Question 1: I added AtmoLight to the config/settings menu in MP2 a while ago, but what always bugged me was that the menu items are sorted alphabetically. The entries themselfs are sorted in the way i added them into the plugin.xml but not the menu items. And it makes it way harder to navigate in my opinion. A screenshot of how it looks like: [ATTACH=full]156929[/ATTACH] However i would like it to be sorted like this: General Settings AtmoWin Hyperion Content Effects Remote Buttons Advanced Settings. plugin.xml section: [url]https://github.com/ambilight-4-mediaportal/AtmoLight/blob/DEV_rework_core/AtmoLight.MediaPortal2/plugin.xml#L38-L79[/url] Is it possible to change the order? If so how? If not, any plans to add the possiblity (pretty please)? [S]Question 2: Is it possible to get the strings from the language files within the plugin, so i can work with them? I have this string in the file: [code]<string name="AtmoLight.AtmoWinConnectionLost">Connection to [Target] lost!</string>[/code] And i want to notify the user. However i would like to replace [Target] with something else within the plugin. Atm im doing this: [code] ServiceRegistration.Get<INotificationService>().EnqueueNotification(NotificationType.Error, "[AtmoLight.Name]", "[AtmoLight.AtmoWinConnectionLost]", true); [/code] Which of course tells me that connection to "[Target]" got lost and not to e.g. AtmoWin. Any method around that returns the string? E.g. GetStringFromLanguage("[AtmoLight.AtmoWinConnectionLost]") returns "Connection to [Target] lost!" [/S] Edit: As soon as i posted this and went to the kitchen to make something to eat i of course knew how i get the answer to question 2 myself... :P For everbody else curious: [code]MediaPortal.Common.Localization.LocalizationHelper.Translate("[AtmoLight.AtmoWinConnectionLost]")[/code] Thanks! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Plugin config order and language file strings within the plugin
Contact us
RSS
Top
Bottom