Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Title Localization in DataSource XML file

    SmartClient version : SmartClient_v90p_2014-03-07_PowerEdition
    Browser(s) and version(s) : Internet Explorer Version 9 and Google Chrome Version 28.0.1500.95 m.

    Please let me know how to localize a field title in data source XML file . Please refer to the code below that I tried and not working

    Code:
    <field name="PR0_NAME_ARABIC" type="text" 	title="<fmt:message key='Field.PRODUCT_NAME_ARABIC' />" />
    Code:
    <field name="PR0_NAME_ARABIC" type="text" >
    	<title><fmt:message key='Field.PRODUCT_NAME_ARABIC' /></title> 
    </field>

    #2
    Can you clarify how your localization attempt is failing?

    We have a localization topic in the documentation here.

    If this doesn't give you enough information to achieve what you need please let us know what you're trying to do and what's failing for you.

    Thanks
    Isomorphic software

    Comment


      #3
      I am trying to create a list grid with no field definition in js file as shown below and the field definition is given in the list grid's data source XML file which is shown below again. In the data source XML file I need arabic and english field names (field titles) based on the logged user locale.


      Java Script
      Code:
      isc.ListGrid.create({
      			ID : "basedOnListGrid",			
      			dataSource : "CUSTODY_HOLDING_BASEDON",
      			autoFetchData : true,
      			autoDraw : true,
      			alternateRecordStyles : true,
      			cellHeight : 22,
      			autoFitWidth : true,
      			showOpenIcons : false,
      			showDropIcons : false,
      			height : "100%",
      			width : "100%",
      			canEdit : false,
      			showFilterEditor : true,
      			selectionType : "single"
      			
      		});
      CUSTODY_HOLDING_BASEDON Datasource XML file

      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <DataSource ID="CUSTODY_HOLDING_BASEDON" serverType="sql" tableName="VRQ1_REQUISITION_DETAIL" dbName="EAD" xmlns:fmt="WEB-INF/" >
      	<fmt:bundle basename="qa.gov.moi.erp.util.resources.messages" />
      	<fields>
      
                          <field name="PR0_NAME_ARABIC" type="text" title="<fmt:message key='Field.PRODUCT_NAME_ARABIC' />" />
      
                         <field name="PR0_NUMBER" type="text" >
      	                     <title><fmt:message key='Field.PRODUCT_NUMBER' /></title> 
                         </field>
               </fields>
      </DataSource>

      Comment


        #4
        What you've shown looks OK. In what way does it not work? Also, to sanity check: do you have a file called "messages.properties" in directory "WEB-INF/classes/qa/gov/moi/erp/util/resources/"? And does it contain a property with the key "Field.PRODUCT_NAME_ARABIC"?

        Comment


          #5
          It works fine. Thanks.

          Comment

          Working...
          X