How to Translate Dates from English to Khmer in Power Apps
Question details
The user needs to translate formatted English dates into Khmer using the Microsoft Translator connector in Power Apps without errors.

- Product
- Power Apps
- Device & OS
- not provided
- Scenario
- Passing an English date value (like December 31, 2024) into the MicrosoftTranslator.Translate function to output the equivalent text in Khmer.
- Observed behavior
- The MicrosoftTranslator.Translate connector fails or returns unpredictable results when a formatted English date is passed directly from Power Apps.
Ensure you have the Microsoft Translator connector actively added to your Power Apps environment and that you are familiar with using the Text() function to format values.
Format Date as Text Before Translation
Use this solution to explicitly convert the date object into a clear, locale-specific text string so the Microsoft Translator API can parse it correctly.
Passing raw date objects or inconsistently formatted date fields directly to the Microsoft Translator connector often causes translation failures. By wrapping the date in a Text() function and specifying an English locale, you provide a predictable string that the translator can accurately process into Khmer.
In your Power Apps formula bar, use the Text function to convert your date field into an explicit string. For example: Text(YourDateValue, "mmmm dd, yyyy", "en-US").
Pass the newly formatted text string as the first argument in the MicrosoftTranslator.Translate() function.
Add the target language code for Khmer by typing "km" as the second argument. The final formula should look similar to: MicrosoftTranslator.Translate(Text(YourDateValue, "mmmm dd, yyyy", "en-US"), "km").

Looking for a Lightweight Alternative for Your Daily Office Tasks?
While Power Apps handles advanced business application development, your everyday document, spreadsheet, and presentation tasks do not have to rely on heavy or expensive software. WPS Office offers a free, lightweight suite with a familiar interface that makes migrating from Microsoft Office completely seamless.
- 1. Download WPS Office: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install the Software: Run the lightweight installer and follow the quick on-screen prompts to set up the suite in just a few minutes.
- 3. Open Your Files Seamlessly: Launch WPS Office and directly open your existing Microsoft Office documents without worrying about losing your formatting or data.

Frequently Asked Questions
Why does MicrosoftTranslator.Translate fail with dates in Power Apps?
Power Apps handles dates as specialized date-time objects. The Microsoft Translator API expects standard text strings. Passing a raw date object directly causes a mismatch in data types, resulting in a failure or skipped translation.
What is the correct language code for Khmer in Microsoft Translator?
The standard language code used by the Microsoft Translator API for Khmer is "km". You must pass this exact string into the translation function to get the correct output.
Can I localize dates natively in Power Apps without using the translator?
Yes. If your goal is simply to display standard calendar data (like month names or days of the week) in a specific language, utilizing native localized formatting or mapping text labels is often much faster and more reliable than making an external API call to a machine translator.




