Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Member
    Join Date
    Apr 2009
    Posts
    36

    Default WHM and cPanel Custom Plugins

    I do plug-ins in this way:
    cPanel Plugins - Developer


    I have added a Chinese plug-in cpanel, but how to make the Chinese language pack plug-ins with the movement changed? To plug into other languages is also a Chinese. What are control?

  2. #2
    Member
    Join Date
    Aug 2009
    Location
    Houston, Tx
    Posts
    275

    Default Plugin Help

    Hello,

    If you are trying to customize a plug-in that would unfortunately be something we do not support. However if you would like some help with your setup we would be happy to help. Please let me know if you have any other questions.
    If you would like to submit a ticket there is a link below:
    Support - cPanel Inc.

    Documentation for cpAddons:
    http://docs.cpanel.net/twiki/bin/vie...Docs/WhmcPanel

    Hope this helps.
    Thanks,
    Last edited by cPanelMattCurry; 08-31-2009 at 12:32 PM.

  3. #3
    Member
    Join Date
    Apr 2009
    Posts
    36

    Default

    I just use cpanel website plug-in generator produces a plug-in, plug-in generator url: cPanel Plugins - Developer
    generated plug-in registration to cpanel, I want to insert pieces of the client be able to follow the client's language pack for language changes. I registered when the plug is in English fonts, how to make plug-in with the language pack to conduct changed?

  4. #4
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by liang3391 View Post
    I just use cpanel website plug-in generator produces a plug-in, plug-in generator url: cPanel Plugins - Developer
    generated plug-in registration to cpanel, I want to insert pieces of the client be able to follow the client's language pack for language changes. I registered when the plug is in English fonts, how to make plug-in with the language pack to conduct changed?
    You want your installed plugin to display properly regardless of the language selected in the cPanel interface?
    Kenneth
    Product Manager
    cPanel, Inc.

  5. #5
    Member
    Join Date
    Aug 2009
    Location
    Houston, Tx
    Posts
    275

    Default Chinease Interface

    Hello,

    I just wanted to clarify, if you are looking for a completely Chinese interface it will be available in 11.24.9, which is in beta. Please let me know if you have any questions.

    Please below link for more information on language setup and use:
    cPanel Community Language Resource - cPanel Inc.

    Thank you,
    Mathew Curry

  6. #6
    Member
    Join Date
    Apr 2009
    Posts
    36

    Default The contents of this post is my problem


  7. #7
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    The cPanel Plugin generator isn't really language or locale aware. Hence it only creates plugins in a single language/locale.
    Kenneth
    Product Manager
    cPanel, Inc.

  8. #8
    Member
    Join Date
    Apr 2009
    Posts
    36

    Default

    How do I give this plug-in the establishment of regional languages do?

  9. #9
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by liang3391 View Post
    How do I give this plug-in the establishment of regional languages do?
    This currently involves manual editing of files via the command line. As part of our revamping of the language system beginning in 11.25, we intend to eventually introduce official locale support for plugins (Internal Case 32966). In the meantime, you can follow these instructions to allow your plugin to display a different label based on the language selected for the cPanel interface:

    1. Open up the file generated by our plugin generator in your preferred text editor. Change the text after itemdesc: to $LANG{mylangkey} where mylangkey can be almost any alphanumeric string without spaces. This is what we call a "language key." Language keys help us look up phrases in language files (more on that later).

    So, instead of something like:

    Code:
    ...
    #cpanelif tag (just the stuff inside <cpanelif> not the tag>
    if:
    #Text to display in cpanel
    itemdesc:Plugin by DavidG
    #order to display the item in cpanel
    itemorder:999
    ...
    We now have something like:
    Code:
    ...
    #cpanelif tag (just the stuff inside <cpanelif> not the tag>
    if:
    #Text to display in cpanel
    itemdesc:$LANG{davidg}
    #order to display the item in cpanel
    itemorder:999
    ...
    If this plugin has already been installed, uninstall it.

    Now, install this plugin.

    2. When you look in cPanel, you'll probably see a "language key not found" error under your plugin. That's expected. Let's go ahead and create that language key.

    Language keys are stored in what we call language files. When you want to add your own language keys to the system, you create a .local file. For example, to create your own language keys for the english-utf8 language file, you would create a file called english-utf8.local. You would place this file in /usr/local/cpanel/lang/ so this key is available to all cPanel themes.

    Language files have a simple format of key=value on each line. Since I'm only creating 1 new language key (in my example, davidg), my /usr/local/cpanel/lang/english-utf8.local file that I created has this as its contents:

    Code:
    davidg=Plugin by DavidG
    I then repeat this process for each language I want to translate this phrase into. For example, I would create /usr/local/cpanel/lang/chinese.local if I wanted to have this message displayed in Chinese. The key (on the left side of =) stays the same, but the value (on the right side of =) changes to be whatever the phrase is translated as, in the other language.

    3. To apply these changes, run the following command via SSH:

    /usr/local/cpanel/bin/cleancachelangfiles

    4. If you still get language key errors or your language keys fail to update when you change them, I've found clearing the contents of /var/cpanel/lang.cache/ then running the above command helps the situation.


    If you need to display which language is currently selected within your plugin, the following API1 code will display the currently selected language:

    HTML Code:
    <cpanel print="$CPDATA{'LANG'}">

  10. #10
    Member
    Join Date
    Apr 2009
    Posts
    36

    Default

    root@server09 [/usr/local/cpanel/bin]# ls clean*
    cleandeadqfiles* cleanupphpmychat*


    Cleancachelangfiles did not find this file, the client interface, prompt missing language key

  11. #11
    Member
    Join Date
    Apr 2009
    Posts
    36

    Default

    /usr/local/cpanel/bin/cachelangfiles But this script does not exist

  12. #12
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by liang3391 View Post
    /usr/local/cpanel/bin/cachelangfiles But this script does not exist
    Try running /scripts/upcp --force

    If the script is still missing, please provide your full cPanel version information.

Similar Threads & Tags
Similar threads

  1. Allow custom icons for WHM Plugins
    By SE_Frank in forum Feature Requests for cPanel/WHM
    Replies: 6
    Last Post: 09-22-2011, 08:40 AM
  2. Replies: 2
    Last Post: 07-25-2011, 11:27 AM
  3. Munin Plugins - adding new graphs(plugins)
    By fujipadam in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-23-2011, 06:21 PM
  4. Tomcat entry missing within (or moved from?) WHM --> cPanel --> Plugins
    By rsilviu in forum cPanel and WHM Discussions
    Replies: 40
    Last Post: 10-13-2007, 10:32 AM
  5. Replies: 40
    Last Post: 10-13-2007, 10:32 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube