The Language Swap System allows you to translate your textual data into as many languages as you wish to support for, output on reports and other output to satisfy a multi-lingual community.
For example, you may want to report your Financial Statements in 2 languages other than your base language in which you work normally. This may be to satisfy outside investors or local tax authorities or regulators. Or you may have many customers that speak another language and want to have their quotation line items in their language.
The system does not translate texts into another language for you automatically. You have to decide what languages you are going to support and what texts you wish to translate. The system provides you with a way of storing your translated texts and then automatically swapping those translated texts for the normal base language texts when requested and appropriate.
The Language Swap system is highly flexible but as ideas, these are circumstances where it can be useful:
The Language Swap system works by maintaining a separate database of text translations. These translated texts are linked to key field values in your data, such as specific part numbers, to a particular language and to a particular field of data. Only character type data can be translated and then only from fields that are free-entry and not associated with codes, relationships, or other fields that would corrupt the logical integrity of the system.
The database of Swap Language translated texts is maintained outside your normal datafile in the same way as the optional Keyword and Linked Files databases are. If you choose to switch the Language Swap system on, you will create or open a datafile with the same name as your main datafile with the file suffix .LSW rather than .DF1 (typically they are in lower-case). This file exclusively contains the text translation single file ALTFILE, in many ways similar to the Keyword system datafile.
You can control the translation languages and the extent to which translations are available in the Language Swap system.
It is very simple to get the Language Swap System operational. These are the steps:
The following illustrates the key visual parts if the Language Swap system:
TIP: You can prevent Users or Groups of users from using the Language Swap System using the system option optLangSwapBlockUsers. Language Swap blocked users and groups. Language code=User,Group list;... list of languages and users or groups blocked from using them. Applies also to Administrators. If no language code is set block applies to all languages. e.g. fr=AA,GM;th=AA,Sales. The block on language use for a user does not stop the Language Swap system functioning. It only means that the User cannot select a swap language in the toolbar list. Indeed if the user is blocked from all languages the Language Swap list will not be present in the toolbar. However, Language Swap is still active and will translate automatically when Customers, Suppliers or Marketing records have a language set for them.
NOTE: Changing the languages after you have created translations will not effect any data. Changing the order will simply change the listing order. A language is only valid if both the code and name are entered. Removing a language will not delete any translated texts you have created in the past - they simply will not be used because you will not be able to select the language in the toolbar list. However, you also will not be able to add any new translations for a missing language.
In the Language Swap list in the toolbar, selecting your local base language turns off any text swapping. Choosing a non-base language will lead to the Language Swap system becoming active in replacing your standard texts with text translations you have made, where available, in the language you have chosen in the toolbar list.
Essentially language text swaps take place in two places:
Besides the Language code settings in Company Details Maintenance, you can set a language code for Marketing Records, Customers and Suppliers. If the language code in these matches a Swap Language code in your settings the following behaviour will exploit translations you have made:
The following activities are affected by the Marketing record language setting:
The following activities are affected by the Customer language setting:
The following activities are affected by the Supplier language setting:
NOTE: Contacts and Addresses
In general it is not particularly useful to translate Addresses and Contacts as your postal/delivery system is unlikely to read a foreign language. But there are circumstances where some data could be usefully swapped into another language. The following rules apply to Language Swap of Contact, Address (and Country) texts:
Only certain files can usefully have texts translated in Language Swap. Typically on Data Maintenance windows where you see this icon you will be able to click on it to maintain Swap Language translations. This opens either the Language Swap Maintenance by Record window or the Language Swap Maintenance by File window depending on the context. The menu function ScratchPads -- Translate for Language Swap operates in the same way on the current top window. To restrict user or group use of these window icon buttons set the privileges for these two menu functions: File -- Advanced -- Language Swap Maintenance by File and ScratchPads -- Translate for Language Swap respectively. The best way to find out what files and fields can be translated is to view the dropdown lists in Language Swap Maintenance by File.
The basic rule is that data texts can be translated that are useful for a one-time translation. There is no point in translating inventory comments, for example, as they are too numerous and of little value outside the business.
It is also important to understand that the Language Swap system enables the translation of data not the program, and things like report literals are part of the program. So, in the example of the Korean translated balance sheet shown above, the top headings are all in the program language of English. An installation of Caliach Vision can, of course, be translated into another language other than English using the Language Management feature, but this is a major undertaking given the size of the program. A better solution to compliment the use of the Language Swap feature is to customise the commonly used report classes, translate the literals on them and have the user select, for example, the Korean Balance Sheet. Then the entire document, rather than just the data is in the foreign language.
In summary, the following table lists the uses of translations of various data:
Use of Language Swap
Addresses and Contacts
Standard marketing letters and addresses on documents, such as quotations, sales orders, estimates and jobs, purchase orders, returns, invoices and credits, etc.. As a special case with customers, the address Default dispatch and packing details is translated when passed to a SO or Job.
Bills of Materials
BoM reports and WOs, Picking Lists and PO Outwork listings.
Typically translated texts are applied to documents. Specifically the default payment terms when applied is translated onto the Quotation, SO, Estimate, Job or Invoice. Financial Statement titles are useful to translate if Financial Statements are to be Language Swapped.
Countries listing report and as Addresses and Contacts above.
In documents such as PO, SO, Jobs and Invoices the currency title is translated to the currency of the supplier or customer, or if they do not have one set, the Language Swap at the time of printing.
Currency listing report is subject to Language Swap.
If the customer has a language set, or the Language Swap is set, the description of a newly created Customer Part record will be translated from the part texts. This allows you to have SO or Job line item descriptions for a specific customer part to be held in it's appropriate language. Customer Parts can also be local text with translations made so that when they are applied on a SO or Job depending on the customer language or Language Swap that is set at the time. Because of the dual mechanism that can apply, you should avoid doubling up by making translations of records that are already pre-translated in the base language data.
Customer Parts reports will Language Swap.
In general where a customer has a specific language set, then translations will be made to that language. Otherwise translations will be made according to the Language Swap set in the toolbar.
When Customer Parts are created the part description will translated to form the customer part description. When data is added to a Quotation, SO, Estimate, Job or Invoice, the text data will be translated onto the document data. When customer reports are printed and any document printed, translations will be applied. Letters, Emails and reports will be translated. A translated form of the User fields will be passed to the document data when options permit.
Delivery detail Language Swap will apply on RFQ and POs as well as delivery detail reports.
Marketing, customer, supplier or Language Swap will apply to Email subject and body texts.
Language Swap translations will apply to employee and work history reports.
Customer, supplier or Language Swap translations will apply to engineering reports and when engineering data is linked to documents.
G/L reference and descriptions are subject to language swap in Financial Statements and G/L reports complementing General Ledger Report Headings.
General Ledger Assets
Asset Register reports.
General Ledger Report Headings
Report heading texts are subject to Language Swap in Financial Statements and reports.
Index descriptions are generally translated into an appropriate language context.
Standard Marketing letters are translated according to the context of their use.
WARNING: Do not translate special syntax such as <B>, <I> or <U> or square bracket notation or style escape strings. These should all remain intact in your translations.
In general where a marketing record has a specific language set, then translations will be made to that language. Otherwise translations will be made according to the Language Swap set in the toolbar.
Customers or suppliers are created from Marketing records the language will migrate to the new customer or supplier. Letters, Emails and reports will be translated. Marketing reports will show translated text.
Language Swap applies to NCRs when reported.
Language swap applies in parts reports. When parts are used on documents an appropriate context translation will be made to part texts. This particularly applied to Customer and Purchase Parts data descriptions or any document line items when a language applies. User field translations will be passed to WO's when options apply and Language Swap is active.
WARNING: Where individual texts contain a Engineering Text link code at the start for embedding in documents, you should leave this out in your translations. The link will be established before any Language Swap takes place and so leaving it in your translation will mean it will be printed on the document.
Process Route Operations
Language Swap translated for reports. When they are replicated for a WO and the WO is Language Swapped when printed, the original operation texts are re-translated from the process route, so in this case modifying WO operation texts for the WO will not be useful for the translated version.
Purchase parts typically derive a description that is a supplier or Language Swap translation of the part description. Alternatively, the description can be translated if Language Swap is set when creating a RFQ or PO. The document line item descriptions are stored in a translated form.
Quality Report and Certificate
The quality comment can be translated in context.
Standard purchase, sales, works and engineering texts translations will be made in context on documents and reports.
In general where a supplier has a specific language set, then translations will be made to that language. Otherwise translations will be made according to the Language Swap set in the toolbar.
When Purchase Parts are created the part description will translated to form the purchase part description. When data is added to a RFQ or PO, the text data will be translated onto the document data. When supplier reports are printed and any document printed, translations will be applied. Letters, Emails and reports will be translated. A translated form of the User fields will be passed to the document data when options permit.
Work Centre descriptions will be translated in context, in particular on Work Orders and Jobs.
You can use the Language Swap System to display language translations directly on the ScratchPads and Workflow Triggers and Alerts or, for that matter any custom report. To do this you use a function $ctask.tLangSwap.$GetSwapText (pKeyValue, pColName, pLanguage, pNormalText). The four parameters are pKeyValue which is the identifier of the record and needs to be prfixed with pRow., for example pRow.PTMPTNO for parts or pRow.CUSCODE for customer. Then the Column Name of the field in the record you want translated. Then optionally the language code for the translation. If this is not entered explicitly the Language Swap toolbar choice of language is applied. Finally, again optionally, the nomal, or un-translated text. If there is no translation available, this text will be returned.
For example, a calculated Parts ScratchPad field calculation could be
would list all Korean translations of the part description in a column in the Parts ScratchPad. Note the pColName needs to be a quoted string. Using (pRow.PTMPTNO,'PTMDESC') would apply the Language Swap toolbar choice for the column at the time the part was added to the ScratchPad.
As another example you could add a column to the General Ledger ScratchPad to show a translated account description. The calculation code would be:
Reports that were derived from pre-V4 designs will not support Language Swap without functions being added. The easiest way to achieve this is to add to the Record $print method:
Do $ctask.tLangSwap.$LoadSwapInFiles (pDataRow, pFiles, pLanguage) Do default
pDataRow is either a row variable or a list variable with the current line set. pFile is a quoted string of any number of tables, comma seperated.
For reports to support Language Swap they need to be tailored with code that implements the swap process. Various functions are available to implement this.
$ctask.tLangSwap.$LoadSwapInCRB (pLanguage, pDataRow)
Replaces any fields in the current main file in pDataRow to their swap translation or to pLanguage if not blank.
$ctask.tLangSwap.$LoadSwapInFiles (pDataRow, pFiles, pLanguage)
Replaces any fields in the pFile table columns in pDataRow to their swap translation or to pLanguage if not blank. pFiles can contain any number of table names separated by commas. pDataRow can be a row variable or list with the current line set. For example, this line of code could be used to language swap G/L financil statement report:
$ctask.tLangSwap.$LoadSwapInList (pList, pFiles, pLanguage)
Swaps translated texts for the Swap Language, or to pLanguage if not blank, for columns in the list pList for columns in pFile tables. pFiles can contain any number of file names separated by commas. The list must contain columns for the tables's key columns.
$ctask.tLangSwap.$LoadSwapInRow (pRow, pFiles, pLanguage)
Swaps translated texts for the Swap Language, or to pLanguage if not blank, for columns in the row pRow for columns in pFile tables. pFiles can contain any number of table names separated by commas. The row must contain columns for the table's key columns.
$ctask.tLangSwap.$LoadSwapInWOO (pDataRow, pLanguage)
Special for WOOFILE records in WOs to replace pDataRow columns with PROFILE translations. WKOPTNO and WOOOPNO must be columns in pDataRow. It translates WO operations with Process Route text translations.
$ctask.tLangSwap.$lookupIDX (pCode, pLanguage)
Returns a language swap text for an index code description in a similar way to the standard lookup would do. pLanguage will overwrite the current swap language. pCode must be the full IDXID value, for example:
$ctask.tLangSwap.$lookupTXT (pCode, pLanguage)
Returns a language swap text for an standard text in a similar way to the standard lookup would do. pLanguage will overwrite the current swap language. pCode must be the full TXTCODE value, for example:
This syntax should be used only for Company Details (from the MCDFILE table) on reports where Language Swap is needed for appropriate columns. For example, in a report showing the text title for Default Sales Order Payment Terms you would usually use MEMORY.m_McdRow.MCDTERM in the report field dataname. If you want Language Swap to apply to the field use MEMORY.m_McdAltRow.MCDTERM instead.
$ctask.tLangSwap.$mcd (pColumn, pLanguage)
Returns the language translations of MCDFILE pColumn but unlike the MEMORY.m_McdAltRow syntax above, you can force a language with pLanguage.
$ctask.tLangSwap.$GetSwapText (pKeyValue, pColName, pLanguage, pNormalText)
Returns the language swap text for the pColName column for the row keyed by pKeyValue. If there is no language swap it returns the pNormalText text. Should be used in custom ScratchPad columns or Workgroup Alert or Trigger calculations where language swap is called for. For example:
|See also: -|
Compiled in Program Version 5.04. Help data last modified 23 Jan 2017 05:36. No class.