Results 1 to 4 of 4

Thread: Problem with Internationalization

  1. #1
    Join Date
    May 2012
    Posts
    7
    Rep Power
    3

    Default Problem with Internationalization

    I have defined the properties file as mentioned in the guide : ZCS 6.0:Zimlet Developers Guide:Internationalization - Zimbra :: Wiki
    And also have different handler name and zimlet name and using this.getMessage("server1") method to access the values from the properties file but I get ???server1??? as the result. (The zimlet shows the argument of this.getMessage() between three ???)
    I have even tried <zimletPanelItem label="${msg.openmeetings_label}" icon="om-panelIcon"> in the xml file and it shows ${msg.openmeetings_label}.
    I think the zimlet is unable to read the properties file. What could be the problem?

  2. #2
    Join Date
    Apr 2011
    Location
    Brazil/Sao Paulo
    Posts
    21
    Rep Power
    4

    Default

    Code:
    <zimlet name="usp_suporte" version="0.4" label="${msg.label}" description="${msg.description}">
      <include>usp_suporte.js</include> 
      <include>templates/usp_suporte.template.js</include> 
      <includeCSS>usp_suporte.css</includeCSS> 
      <handlerObject>uspSuporte_handlerObject</handlerObject> 
      <resource>usp_suporte.png</resource> 
      <resource>b_back.png</resource> 
      <resource>b_fwd.png</resource> 
      <zimletPanelItem label="${msg.panelDescription}" icon="suporteIcon" /> 
    </zimlet>
    Also, you need a file like:

    usp_suporte.properties

    and inside, you put this:

    Code:
    #
    # usp_suporte.xml
    #
    label = Support Central
    description = Helpdesk Support Central
    panelDescription = A Helpdesk Application
    Now, if you want to give support to another language, you should create a file like this:

    usp_suporte_en_GB.properties

    In my case, as I am from Brazil:

    usp_suporte_pt_BR.properties

    And fill those with the translated version:


    Code:
    #
    # text for file usp_suporte.xml
    #
    label = Central de Suporte
    description = Helpdesk: Central de Suporte
    panelDescription = Uma aplicação de Helpdesk
    And at least this should work just fine. Now, to answer your question, normally when I got something like this ${msg.openmeetings_label} as out´put instead of "Meeting Label", you got a error on your code. Maybe a extra { } or something between -> " " that wasn't closed. Check your code, to be sure, try something simple, like I just showed. If you use template, be careful where you put your code. I dunno if this is helpful, but double check your code. =)

  3. #3
    Join Date
    May 2012
    Posts
    7
    Rep Power
    3

    Default

    Thanks for your reply but I think I have done exactly the same thing.

    <zimlet name="com_zimbra_om" version="0.1" description="add OM functions in zimbra">
    <include>com_zimbra_om.js</include>
    <includeCSS>com_zimbra_om.css</includeCSS>
    <handlerObject>com_zimbra_om_handlerObject</handlerObject>

    <zimletPanelItem label="${msg.openmeetings_label}" icon="om-panelIcon">
    <toolTipText>OM meetings and events</toolTipText>
    <contextMenu>
    <menuItem label = "Zimlet Preferences" id= "om_preferences"/>
    </contextMenu>
    </zimletPanelItem>
    <userProperties>
    <property type = "string" name = "server1_baseurl" value = ""/>
    <property type = "string" name = "server1_username" value = ""/>
    <property type = "string" name = "server1_password" value = ""/>
    <property type = "string" name = "server2_baseurl" value = ""/>
    <property type = "string" name = "server2_username" value = ""/>
    <property type = "string" name = "server2_password" value = ""/>
    <property type = "string" name = "server3_baseurl" value = ""/>
    <property type = "string" name = "server3_username" value = ""/>
    <property type = "string" name = "server3_password" value = ""/>
    <property type = "string" name = "server4_baseurl" value = ""/>
    <property type = "string" name = "server4_username" value = ""/>
    <property type = "string" name = "server4_password" value = ""/>
    <property type = "string" name = "server5_baseurl" value = "" />
    <property type = "string" name = "server5_username" value = ""/>
    <property type = "string" name = "server5_password" value = ""/>
    </userProperties>
    </zimlet>

    and the file com_zimbra_om.properties:

    openmeetings_label = Openmeetings

  4. #4
    Join Date
    Apr 2011
    Location
    Brazil/Sao Paulo
    Posts
    21
    Rep Power
    4

    Default

    To be honest, I put those lines of code to help, if someone search the forum for problem with internationalization. :-)
    I do believe that your code for internationalization is right, so, you should check your code for missing ; or extra ; when not needed, also check for " or {} in the wrong place, for example, you should be careful when using this on your template. As I said, this can broke your code in a way that instead of the right value from your properties file, you got the var name. If you use jquery, or imported it, try removing this lib or the lines of code using jquery notation.


    I hope that you find the cause of this problem, and if possible share with us here in the forum. :-)

    Cheers.

Similar Threads

  1. Zimlet Internationalization Issue
    By uxbod in forum Zimlets
    Replies: 2
    Last Post: 06-13-2012, 01:28 PM
  2. Replies: 2
    Last Post: 04-12-2010, 01:13 PM
  3. Problem Building From Source Problem
    By Neoryder in forum Developers
    Replies: 0
    Last Post: 06-18-2009, 04:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •