# Localisation of native Alert Window button text

**URL:** <https://forum.juce.com/t/localisation-of-native-alert-window-button-text/9068>\
**Category:** General JUCE discussion\
**Created:** [August 7, 2012, 11:06am UTC](https://forum.juce.com/t/localisation-of-native-alert-window-button-text/9068 "2012-08-07T11:06:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![liamtmlacey](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/liamtmlacey/32/82_2.png) [@liamtmlacey](https://forum.juce.com/u/liamtmlacey)\
**Post date:** [August 7, 2012, 11:06am UTC](https://forum.juce.com/t/localisation-of-native-alert-window-button-text/9068/1 "2012-08-07T11:06:20Z")

</div>

Would it be possible to implement the TRANS() macro or translate() function to the classes that handle the native alert windows so that the buttons text can be translated using LocalisedStrings?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [August 7, 2012, 12:05pm UTC](https://forum.juce.com/t/localisation-of-native-alert-window-button-text/9068/2 "2012-08-07T12:05:18Z")

</div>

I think all the text in the alert window classes is already wrapped inside TRANS macros… Which strings aren’t working for you?

---

<div class="post-metadata">

**Author:** ![liamtmlacey](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/liamtmlacey/32/82_2.png) [@liamtmlacey](https://forum.juce.com/u/liamtmlacey)\
**Post date:** [August 7, 2012, 1:19pm UTC](https://forum.juce.com/t/localisation-of-native-alert-window-button-text/9068/3 "2012-08-07T13:19:28Z")

</div>

It’s only the juce alert windows which have the Strings wrapped. In the native alert windows (in the juce\_mac\_Windowing.mm file, and I’m guessing the other relevant platform-specific files too) the “Yes”, “No”, “OK” and “cancel” text isn’t wrapped. I’ve tried adding it myself but haven’t been successful.

While we’re on the subject, should I still be using TRANS() or should I be calling translate() directly?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [August 7, 2012, 1:22pm UTC](https://forum.juce.com/t/localisation-of-native-alert-window-button-text/9068/4 "2012-08-07T13:22:39Z")

</div>

Oh, sorry, you said the _native_ alerts. Ok, good point, I’ll have a look at those!

---

<div class="post-metadata">

**Author:** ![liamtmlacey](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/liamtmlacey/32/82_2.png) [@liamtmlacey](https://forum.juce.com/u/liamtmlacey)\
**Post date:** [August 7, 2012, 3:06pm UTC](https://forum.juce.com/t/localisation-of-native-alert-window-button-text/9068/5 "2012-08-07T15:06:14Z")

</div>

Cheers for the fix Jules, working great. Is it all setup for native windows in Linux and Windows too?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [August 7, 2012, 3:36pm UTC](https://forum.juce.com/t/localisation-of-native-alert-window-button-text/9068/6 "2012-08-07T15:36:15Z")

</div>

> [@millenliam](#):
>
> Cheers for the fix Jules, working great. Is it all setup for native windows in Linux and Windows too?

Windows supplies the strings itself, you can’t change them. And I don’t think I implemented native alerts on linux (?)

---

<div class="post-metadata">

**Author:** ![liamtmlacey](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/liamtmlacey/32/82_2.png) [@liamtmlacey](https://forum.juce.com/u/liamtmlacey)\
**Post date:** [August 8, 2012, 12:48pm UTC](https://forum.juce.com/t/localisation-of-native-alert-window-button-text/9068/7 "2012-08-08T12:48:13Z")

</div>

Sorry Jules, I’ve found some more mac-native Strings that aren’t wrapped with the TRANS() macro, this time with the mac native menu bar. These are the Services, Hide, Hide Others, Show All, and Quit menu bar items of the apple menu, which are implemented in the juce\_mac\_MainMenu.mm file.

Would it be possible to fix that please?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [August 8, 2012, 1:26pm UTC](https://forum.juce.com/t/localisation-of-native-alert-window-button-text/9068/8 "2012-08-08T13:26:13Z")

</div>

Ok, thanks, I’ll take a look.
