全球支援Global support

PowerApps 是全球性產品。PowerApps is a global product. 您可以建置眾多不同語言的應用程式並在許多不同區域中使用。You can build and use apps in many different languages and regions.

在建置和執行應用程式時,PowerApps 所顯示的文字已經翻譯成各種語言。Both while building and running apps, the text displayed by PowerApps has been translated into a variety of languages. 您會看到原生語言的功能表項目、對話方塊、功能區索引標籤與其他文字。You will see menu items, dialog boxes, ribbon tabs, and other text in your native language. 輸入和顯示的日期與數字也會根據您特定的語言和區域而調整。Typing in and displaying dates and numbers is also adapted for your particular language and region. 例如,世界上的某些區域使用 "." 做為小數分隔符號,某些則使用 ","。For example, some regions of the world use "." as a decimal separator while others use ",".

您所建立的應用程式也可以讓全世界知道。The apps you create can be globally aware as well. 請使用 LanguageTextValueDateValue 和其他函式,來調整所顯示並作為不同語言之輸入的內容。Use the Language, Text, Value, DateValue and other functions to adapt what is displayed and used as input in different languages.

語言設定Language settings

在使用原生工作室或原生播放程式時,所使用的語言是由主機的作業系統提供。When using the native studio or a native player, the language used is provided by the host operating system. 在 Windows 中,這可以在 [所有設定] > [時間與語言] 設定底下進行控制。For Windows, this can be controlled under "All Settings" and then "Time & language" settings. Windows 也可讓您指定小數分隔符號所要使用的字元,以覆寫語言設定。Windows also allows you to specify the characters to use for the decimal separator, overriding the language setting.

在使用 Web 體驗時,所使用的語言是由瀏覽器提供。When using the web experiences, the language used is provided by the browser. 大部分瀏覽器會預設使用主機作業系統的設定,但有一些也會提供方法讓您手動設定語言。Most browser default to the host operating system's setting with some also providing a way to set the language manually.

編寫環境Authoring environment

編寫環境會順應編寫者的語言設定。The authoring environment adapts to the language setting of the author. 應用程式本身會以語言中立的方式儲存,讓使用不同語言的編寫者可以編輯相同的應用程式。The app itself is stored in a language agnostic manner, so that authors using different languages can edit the same app.

公式中的名稱Names in formulas

公式中的大部分元素一律採用英文︰Most elements in formula are always in English:

  • 函式名稱︰IfNavigateCollect、...Function names: If, Navigate, Collect, ...
  • 控制項屬性名稱︰Screen.FillButton.OnSelectTextbox.Font、...Control property names: Screen.Fill, Button.OnSelect, Textbox.Font, ...
  • 列舉名稱︰Color.AquaDataSourceInfo.MaxValueFontWeight.Bold...Enumeration names: Color.Aqua, DataSourceInfo.MaxValue, FontWeight.Bold...
  • 訊號記錄︰Compass.HeadingLocation.LatitudeApp.ActiveScreen、...Signal records: Compass.Heading, Location. Latitude, App.ActiveScreen, ...
  • 運算子:ParentinexactIn、...Operators: Parent, in, exactIn, ...

由於編寫經驗會當地語系化,控制項和其他物件的名稱會以編寫者的原生語言來顯示。As the authoring experience is localized, control and other object names will appear in the native language of the author. 某些控制項的西班牙文名稱會顯示為︰In Spanish, some of the control names appear as:

當您將上述其中一個控制項插入您的應用程式時,其名稱預設使用英文。When you insert one of these into your app, their name will default to English. 這麼做是為了與控制項的屬性名稱和公式的其餘部分保持一致。This is done for consistency with the control property names and the rest of the formula. 例如,上面列出的 Casilla 會插入為 Checkbox1For example, Casilla listed above is inserted as Checkbox1.

控制項插入後,您可以將其名稱變更為任何您喜歡的名稱。After a control is inserted, you can change the name to whatever you like. 在選取的狀況下,[內容] 功能區的最左邊會顯示控制項的名稱。While selected, the far left hand side of the "Content" ribbon displays the name of the control. 選取此名稱可下拉出文字方塊供您編輯名稱︰Selecting this name drops down a text box where you can edit the name:

如有需要,您可以在這裡將控制項重新命名為 Casilla1If you like, here you can rename the control to Casilla1. 此案例中的紅色曲線是由瀏覽器所顯示,原因是這個名稱不是西班牙文單字,所以沒什麼關係。The red squiggly, in this case displayed by a browser, is because the name is not a Spanish word and is of no concern.

下列項目的名稱可隨您喜好命名︰You can use whatever names you like for:

  • 控制項名稱Control names
  • 集合名稱Collection names
  • 內容變數名稱Context variable names

公式分隔符號和鏈結運算子Formula separators and chaining operator

某些分隔符號和運算子會隨編寫者所用語言的小數分隔符號而轉變︰Some separators and operators will shift based on the decimal separator of the author's language:

編寫者所用語言的小數分隔符號Author's language decimal separator PowerApps 小數分隔符號PowerApps decimal separator PowerApps 清單分隔符號PowerApps list separator PowerApps 鏈結運算子PowerApps chaining operator
.. (句點)(period) .. (句點)(period) , (逗號), (comma) ; (分號); (semi-colon)
, (逗號), (comma) , (逗號), (comma) ; (分號); (semi-colon) ;; (雙分號);; (double semi-colon)

PowerApps 清單分隔符號的變化會與 Excel 清單分隔符號的變化一致。The change in the PowerApps list separator is consistent with that happens to the Excel list separator. 它會影響︰It impacts:

例如,請設想下列使用 "en-US" 的公式︰For example, consider the following formula in "en-US":

  • If( Slider1.Value > 12.59, UpdateContext( { Validation: true, MovingOn: 1 } ); Navigate( "NextScreen", "" ), UpdateContext( { Validation: false } ) )If( Slider1.Value > 12.59, UpdateContext( { Validation: true, MovingOn: 1 } ); Navigate( "NextScreen", "" ), UpdateContext( { Validation: false } ) )

在小數分隔符號使用 "," 的語言中,此公式在編寫體驗中會呈現為︰In a language where "," is used for the decimal separator, this will appear in the authoring experience as:

  • If( Slider1.Value > 12,59; UpdateContext( { Validation: true; MovingOn: 1 } );; Navigate( "NextScreen", "" ); UpdateContext( { Validation: false } ) )If( Slider1.Value > 12,59; UpdateContext( { Validation: true; MovingOn: 1 } );; Navigate( "NextScreen", "" ); UpdateContext( { Validation: false } ) )

請注意,屬性選擇運算子 .Note that the property selection operator . Slider1.Value 中永遠不變,無論小數分隔符號為何。in Slider1.Value is always the same, no matter what the decimal separator is.

公式內部並不會改變,所改變的是其顯示方式和編寫者的編輯方式。Internally the formula does not change, all that changes is how it is displayed and edited by the author. 使用兩種不同語言的兩位不同編寫者可檢視和編輯相同的公式,但兩位都會看到適用於其語言的分隔符號和運算子。Two different authors using two different languages can view and edit the same formula, with each seeing the appropriate separators and operators for their language.

建立全球性應用程式Creating a global app

您所建立的應用程式可順應不同語言,為您在世界各地的使用者提供絕佳的使用者體驗。The app you create can adapt to different languages, providing a great user experience for your users around the world.

語言函式Language function

Language 函式會傳回目前使用者慣用語言的語言標記。The Language function returns the language tag of the current user. 例如,若是英國的使用者,此函式會傳回 "en-GB",若是德國的使用者,此函式會傳回 "de-DE"For example, this function returns "en-GB" for users in Great Britain and "de-DE" for users in Germany.

此外,您可以使用 Language 來為使用者顯示翻譯過的文字。Among other things, you can use Language to display translated text for your users. 您的應用程式中可以包含翻譯值的資料表︰Your app can include a table of translated values in your app:

然後,使用如下所示的公式從資料表中提取已翻譯的字串︰And then use a formula such as the following to pull translated strings from the table:

  • LookUp( Table1, TextID = "Hello" && (LanguageTag = Left( Language(), 2 ) || IsBlank( LanguageTag ))).LocalizedTextLookUp( Table1, TextID = "Hello" && (LanguageTag = Left( Language(), 2 ) || IsBlank( LanguageTag ))).LocalizedText

請注意,其他語言的翻譯字串可能會比您所用語言的字串長得多。Be aware that translated strings in other languages could be significantly longer than they are in your language. 在許多情況下,於使用者介面中顯示字串的標籤和其他元素必須更寬才能容納得下。In many cases, the labels and other elements that display the strings in your user interface will need to be wider to accommodate.

如需詳細資訊,請參閱 Language 函式的文件。For more information, see the documentation for the Language function.

設定數字、日期和時間的格式Formatting numbers, dates, and times

世界各地的數字、日期和時間會以不同格式來書寫。Numbers, dates, and times are written in different formats in different parts of the world. 不同地方的逗號、小數以及月、日和年的順序會有不同意義。The meaning of commas, decimals, and the order of month, date, and year vary from location to location.

Text 函式會使用使用者的語言設定,來設定數字和日期的格式。The Text function formats numbers and dates using the language setting of the user.

Text 需要格式字串才能知道您要如何設定數字或日期的格式。Text requires a format string to know how you want to format the number or date. 此格式字串可採用下列兩種形式的其中一種︰This format string can take one of two forms:

  • 全球感知列舉。A global aware enumeration. 例如,Text( Now(), DateTimeFormat.LongDate )For example, Text( Now(), DateTimeFormat.LongDate ). 此公式會以適用於該語言的格式來設定目前日期的格式。This formula will format the current date in a language appropriate format. 這是比較好的格式字串指定方式。This is the preferred way to specify the format string.
  • 自訂格式字串。A custom format string. 例如,Text( Now(), "[$-en-US]dddd, mmmm dd, yyyy" ) 在用於 "en-US" 語言時,會顯示和列舉相同的文字。For example, Text( Now(), "[$-en-US]dddd, mmmm dd, yyyy" ) displays the same text as the enumeration when used in the language "en-US". 自訂格式字串的優點是您可以指定完全符合需求的字串。The advantage of the custom format string is that you can specify exactly what you want.

自訂格式字串前的 "[$-en-US]" 會對 Text 指出該以何種語言解譯自訂格式字串。The "[$-en-US]" on the front of the custom format string tells Text in which language to interpret the custom format string. 此引數會自動插入,且預設使用您在編寫時所用的語言。This is inserted for you and defaults to your authoring language. 您通常不需要變更此引數。Normally you will not need to change this. 當使用不同語言的編寫者在編輯相同的應用程式時,此引數會很有用。It is useful when authors from different languages are editing the same app.

Text 的第三個引數會指定函式的結果所要使用的語言。The third argument to Text specifies which language to use for the result of the function. 預設值是目前使用者的語言設定。The default is the language setting of the current user.

如需詳細資訊,請參閱 Text 函式的文件。For more information, see the documentation for the Text function.

讀取數字、日期和時間Reading numbers, dates, and times

有四個函式可讀取使用者所提供的數字、日期和時間︰There are four functions for reading numbers, dates, and times provided by the user:

  • Value︰將文字字串中的數字轉換為數值。Value: Converts a number in a text string to a number value.
  • DateValue:將文字字串中的日期值轉換為日期/時間值。DateValue: Converts a date value in a text string to a date/time value. 文字字串中指定的任何時間都會遭到忽略。Any time specified in the text string is ignored.
  • TimeValue:將文字字串中的時間值轉換為日期/時間值。TimeValue: Converts a time value in a text string to a date/time value. 文字字串中指定的任何日期都會遭到忽略。Any date specified in the text string is ignored.
  • DateTimeValue:將文字字串中的日期和時間值轉換為日期/時間值。DateTimeValue: Converts a date and time value in a text string to a date/time value.

如果您已使用 Excel,這些函式會全部結合成單一 Value 函式。If you have used Excel, all of these functions are combined in the single Value function. 這些函式在這裡會分拆開來,因為 PowerApps 對於日期/時間值和數字有不同的類型。They are broken out here since PowerApps has separate types for date/time values and numbers.

這些函式全都具有相同的引數︰All of these functions have the same arguments:

  • 字串 (必要)︰使用者提供的字串。String, required: A string from the user. 例如,輸入到文字輸入控制項,並使用 Text 屬性從控制項中讀取的字串。For example a string types into a Text input control and read from the control with the Text property.
  • 語言 (選擇性)︰用來解譯 String 的語言。Language, optional: The language in which to interpret the String. 預設值是使用者的語言設定。By default, the language setting of the user.

例如:For example:

  • Value( "12,345.678", "en-US" )Value( "12,345.678" ) 若位於使用者語言為 "en-US" 的地方,會傳回 12345.678 以供計算。Value( "12,345.678", "en-US" ) or Value( "12,345.678" ) when located where "en-US" is the user's language returns the number 12345.678, ready for calculations.
  • DateValue( "1/2/01", "es-ES" )DateValue( "1/2/01" ) 若位於使用者語言為 "es-ES" 的地方,會傳回日期/時間值 February 1, 2001 at midnightDateValue( "1/2/01", "es-ES" ) or DateValue( "1/2/01" ) when located where "es-ES" is the user's language returns the date/time value February 1, 2001 at midnight.
  • TimeValue( "11:43:02", "fr-FR" )DateValue( "11:43:02" ) 若位於使用者語言為 "fr-FR" 的地方,會傳回日期/時間值 January 1, 1970 at 11:43:02TimeValue( "11:43:02", "fr-FR" ) or DateValue( "11:43:02" ) when located where "fr-FR" is the user's language returns the date/time value January 1, 1970 at 11:43:02.
  • TimeDateValue( "11:43:02 1/2/01", "de-DE" )DateValue( "11:43:02" ) 若位於使用者語言為 "de-DE" 的地方,會傳回日期/時間值 February 1, 2001 at 11:43:02TimeDateValue( "11:43:02 1/2/01", "de-DE" ) or DateValue( "11:43:02" ) when located where "de-DE" is the user's language returns the date/time value February 1, 2001 at 11:43:02.

如需詳細資訊,請參閱 ValueDateValue、TimeValue 和 DateTimeValue 函式以及處理日期和時間的文件。For more information, see the documentation for the Value and DateValue, TimeValue, and DateTimeValue functions and working with dates and times.

日曆和時鐘資訊Calendar and Clock information

CalendarClock 函式可提供使用者目前所用語言的日曆和時鐘資訊。The Calendar and Clock functions provide calendar and clock information for the user's current language.

此外,請使用這些函式來提供下拉式清單控制項與選項清單。Among other things, use these functions to provide a Dropdown control with a list of choices.

如需詳細資訊,請參閱 CalendarClock 函式的文件。For more information, see the documentation for the Calendar and Clock functions.