19 lines
No EOL
4.6 KiB
XML
19 lines
No EOL
4.6 KiB
XML
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Localizability on AL Guidelines</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/</link><description>Recent content in Localizability on AL Guidelines</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/index.xml" rel="self" type="application/rss+xml"/><item><title>CaptionML on System Pages</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/captionml-for-system-tables/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/captionml-for-system-tables/</guid><description>CaptionML should always be specified on a page field for a system table. By default, system tables do not have captions, so if you need to use them in the UI then captions need to be added.
|
|
Bad code
|
|
... { 2 ;2 ;Field ; SourceExpr=Name } ... OBJECT Table 2000000000 User ... { 2 ; ;Name ;Text50 } Good code
|
|
... { 2 ;2 ;Field ; CaptionML=ENU=Name; SourceExpr=Name } .</description></item><item><title>FIELDCAPTION and TABLECAPTION</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/fieldcaption-and-tablecaption/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/fieldcaption-and-tablecaption/</guid><description>For user messages, errors etc., use FIELDCAPTION not FIELDNAME and TABLECAPTION not TABLENAME.
|
|
Reason:
|
|
The correct translation will be automatically used. If the caption/name changes, then there will be a single point of change needed. Bad code
|
|
IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDNAME(&#34;Location Code&#34;),...) Good code
|
|
IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDCAPTION(&#34;Location Code&#34;),...)</description></item><item><title>Global Text Constants</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/global-text-constants/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/global-text-constants/</guid><description>Declare Text Constant as global variables.
|
|
Bad code
|
|
PROCEDURE GetRequirementText@6(...) : Text[50]; VAR RequirementOptionsTxt@1002 : TextConst &#39;ENU=Shipment,Receive,Pick,Put-Away&#39;; BEGIN Good code
|
|
VAR RequirementOptionsTxt@1002 : TextConst &#39;ENU=Shipment,Receive,Pick,Put-Away&#39;; ... PROCEDURE GetRequirementText@6(...) : Text[50]; BEGIN</description></item><item><title>Use Text Constants</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/use-text-constants/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/use-text-constants/</guid><description>Pass user messages using Text Constants. It makes translation easy.
|
|
Bad code
|
|
ImportAttachmentQst@1021 : TextConst &#39;ENU=&#34;Import attachment &#34;&#39;; ... IF CONFIRM(ImportAttachmentQst + Caption +&#39;?&#39;,TRUE) THEN BEGIN Good code
|
|
ImportAttachmentQst@1021 : TextConst &#39;ENU=&#34;Import attachment %1?&#34;&#39;; ... IF CONFIRM(STRSUBSTNO(ImportAttachmentQst, Caption),TRUE) THEN BEGIN Bad code
|
|
... IF NOT CONFIRM( STRSUBSTNO( &#39;Difference on Periodic entries: %1 on %2&#39; + &#39;Do you want to continue?&#39;,Balance,Date), TRUE) THEN ERROR(&#39;Program terminated by the user&#39;); Good code
|
|
DiffOnPeriodEntiesQst@100 : TextConst &#39;ENU=&#34;Difference on Periodic entries: %1 on %2\\ Do you want to continue?</description></item><item><title>Using OptionCaptionML</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/using-optioncaptionml/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/using-optioncaptionml/</guid><description>The OptionCaptionML should be filled in for sourceexpression using option data types.
|
|
Bad code
|
|
{ 30 ;TextBox ;17850;0 ;150 ;423 ;Name=Selection; SourceExpr=Selection; DataSetFieldName=Selection } ... Selection@1008 : 'Open,Closed,Open and Closed'; ... Good code
|
|
{ 30 ;TextBox ;17850;0 ;150 ;423 ;Name=Selection; OptionCaptionML=ENU=Open,Closed,Open and Closed; SourceExpr=Selection; DataSetFieldName=Selection } ... Selection@1008 : 'Open,Closed,Open and Closed';</description></item></channel></rss> |