Editing a Language Resource File [MIGRATED]

A Language Resource File contains the translated labels, keys and other functioning terms to be displayed in place of the default language (English).
The format of a Language Resource File looks like this: resource_zh.xml (for Chinese) and resource_ja.xml (for Japanese).

1) Go to the Language Resource Files file cabinet to obtain the Language Resource File that corresponds to your desired language.

2) Download the file to your system and open the file using a text editor.



Understanding the Contents of a Language Resource File

The lines of code that sit in a Language Resource File look like the below:

<!-- Menu :: Trading Module -->
<entry key="menu_trading">Trading</entry>
    
    
<!-- Menu :: Trading Module :: Sales -->
    <entry key="menu_trading_sales">Sales</entry>

        <!-- Menu :: Trading Module :: Sales :: Pages -->
        <entry key="menu_trading_sales_cashSale">Cash Sale</entry>
        <entry key="menu_trading_sales_fullScreenCashSale">Full Screen Cash Sale</entry>
        <entry key="menu_trading_sales_createInvoice">Create Invoice</entry>
        <entry key="menu_trading_sales_editInvoice">Edit Invoice</entry>
        <entry key="menu_trading_sales_cancelCashSale">Cancel Cash Sale / Invoice</entry>
        <entry key="menu_trading_sales_salesReturnByInvoice">Sales Return by Invoice</entry>
        <entry key="menu_trading_sales_salesReturnMultiInvoice">Sales Return (Multi-Invoice)</entry>
        <entry key="menu_trading_sales_settlementCollection">Settlement / Collection</entry>
        <entry key="menu_trading_sales_invoiceListing">Invoice Listing</entry>


The blue text are comment lines that are a brief description or an indicator of what the following lines of code are pointing to and are used for.
The teal text are markup language tags (programming jargon for the most part).
The pink text are unique keys assigned to each page element which display names can be altered or translated. This text can be used to assist in identifying the page elements.
The black text are the labels  words that the user would ultimately see.

Stripped down to its basics, the code represents:

<!-- Comments/Description/Indicator -->
<Tag="key">Label</tag>

In summary, the only text to be changed in a Language Resource File are the black ones. Altering of any other texts would render the Language Resource File broken.



Elaboration and Examples


<!-- Menu :: Trading Module -->
        <entry key="menu_trading">Trading</entry>

------ In the lines of code above, the comment line (blue text) indicates that the line of code below it points to the label of "Trading" module in the Menu.
------ Therefore, to change the display of this label into a translated word of another language, the word "Trading" will be removed and replaced with the translated word(s).


<!-- Menu :: Customer Module -->
        <entry key="menu_customer">顾客</entry>

------ The lines of code above point to the label of "Customer" module in the Menu.
------ As observed, instead of having the word "Customer" entered as its label, the Chinese translated words are entered instead.
------ As a result, 顾客 will end up appearing in place of "Customer".



Sample of Before and After

Below is a sample taken out of a default Language Resource File and then translated into Chinese to display the available page elements of the Daily Invoice Summary Report EMP screen.


The Before (original code written in default language):

            <!-- Reports :: Manager Reports :: Daily Invoice Summary Report -->
            <entry key="reports_managerReports_dailyInvoiceSummaryReport_pageTitle">Daily Invoice Summary Report</entry>
            <entry key="reports_managerReports_dailyInvoiceSummaryReport_branch_label">Branch</entry>
            <entry key="reports_managerReports_dailyInvoiceSummaryReport_user_label">User</entry>
            <entry key="reports_managerReports_dailyInvoiceSummaryReport_salesman_label">Salesman</entry>
            

          
The After (altered code written in the Chinese Language Resource File upon translation):
     
            <!-- Reports :: Manager Reports :: Daily Invoice Summary Report -->
            <entry key="reports_managerReports_dailyInvoiceSummaryReport_pageTitle">Daily Invoice Summary Report</entry>
            <entry key="reports_managerReports_dailyInvoiceSummaryReport_branch_label">终端</entry>
            <entry key="reports_managerReports_dailyInvoiceSummaryReport_user_label">用户</entry>
            <entry key="reports_managerReports_dailyInvoiceSummaryReport_salesman_label">销售人</entry>




What to be Done with the Newly Edited Language Resource File

- After saving the changes made, the newly edited Language Resource File is uploaded into the user's EMP to be used as a translation tool.
- Proceed to Adding a Language Resource File.



  


          



Comments