Internationalization (i18n) -> Predefined messages -> @@ui_locale

150 views
Skip to first unread message

Markus

unread,
May 31, 2012, 4:28:09 AM5/31/12
to Chromium-extensions
Hi,

I tried to get the actual localCode an send it via Url to open a
popup. But the @@ui_locale doesn´t work.
Can somebody show me my mistake?

in sample.js:
function OpenUrl(){
chrome.windows.create({"url": "http://www.blabla.de/Suggest.php?
parameter1=" + parameter1 + "&Language=" +
"__MSG_@@ui_locale__&Original=test", "width": 500, "height": 700,
"type": "popup"});
}

But opened popup shows the following URL:
http://www.blabla.de/Suggest.php?parameter1=123&Language=__MSG_@@ui_locale__&Original=test

I thought the parameter Language automaticly should be filled
automaticly out for example "Language=en".

Jamie Walch

unread,
Jun 4, 2012, 11:15:31 AM6/4/12
to Markus, Chromium-extensions
I think you'll need to explicitly call chrome.i18n.getMessage to
translate the '@@ui_locale' tag. The __MSG trick only works in a few
contexts.
> --
> You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
> To post to this group, send email to chromium-...@chromium.org.
> To unsubscribe from this group, send email to chromium-extens...@chromium.org.
> For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
>

Markus

unread,
Jun 4, 2012, 1:49:42 PM6/4/12
to Chromium-extensions
You´re right. Now it´s working:

var Language = chrome.i18n.getMessage("@@ui_locale");

Thanks a lot!



On 4 Jun., 17:15, Jamie Walch <jamiewa...@chromium.org> wrote:
> I think you'll need to explicitly call chrome.i18n.getMessage to
> translate the '@@ui_locale' tag. The __MSG trick only works in a few
> contexts.
>
>
>
>
>
>
>
> On Thu, May 31, 2012 at 1:28 AM, Markus <markus.wall...@wwh-com.de> wrote:
> > Hi,
>
> > I tried to get the actual localCode an send it via Url to open a
> > popup. But the @@ui_locale doesn´t work.
> > Can somebody show me my mistake?
>
> > in sample.js:
> > function OpenUrl(){
> >        chrome.windows.create({"url": "http://www.blabla.de/Suggest.php?
> > parameter1=" + parameter1 + "&Language=" +
> > "__MSG_@@ui_locale__&Original=test", "width": 500, "height": 700,
> > "type": "popup"});
> > }
>
> > But opened popup shows the following URL:
> >http://www.blabla.de/Suggest.php?parameter1=123&Language=__MSG_@@ui_l...
>
> > I thought the parameter Language automaticly should be filled
> > automaticly out for example "Language=en".
>
> > --
> > You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
> > To post to this group, send email to chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to chromium-extensions+unsubscr...@chromium.org.
Reply all
Reply to author
Forward
0 new messages