Opened 10 years ago

Closed 10 years ago

#14956 closed defect (invalid)

Unable to set locale and apply to Editor widget

Reported by: dylan Owned by: itorrey
Priority: low Milestone: 1.7.3
Component: Documentation Version: 1.7.2
Keywords: Cc: Adam Peller
Blocked By: Blocking:


Not sure if this is specific to the Editor widget or not, but I'm unable to set the locale of the Editor widget to something besides the root locale.

Whereas the example in 1.6 works:

Change History (7)

comment:1 Changed 10 years ago by bill

Cc: Adam Peller added

Usually this kind of problem is because dojo only bundles a few locales by default, and Chinese isn't one of them, although not sure why it would have changed from 1.6 to 1.7.

comment:2 Changed 10 years ago by Rawld Gill

Status: newassigned

comment:3 Changed 10 years ago by Adam Peller

Chinese is one of the base locales supported by Dojo in our standard distribution. zh-cn should fallback to zh for Simplified Chinese.

comment:4 Changed 10 years ago by Adam Peller

@dylan: also, the require on dojo/i18n should not be necessary, and the demo should either use domReady! and parser *or* parseOnLoad -- the latter is deprecated?

comment:5 Changed 10 years ago by Rawld Gill

Component: InternationalizationDocumentation
Priority: blockerlow

The problem is in dojo/parser, line

lang: node.getAttribute("lang") || grandparent.lang,


function getEffective(parent)

which sets the lang attribute of the Editor widget to the value given--in this case--in the document. Notice that demo.html starts with

<html lang="en">

The problem can be fixed by removing the lang attribute value from the html element.

I'm assuming the parser change is desired.

Now the hard part for me...where the heck does demo.html live?

comment:6 Changed 10 years ago by bill

Owner: changed from Rawld Gill to itorrey

The parser works that way by design (otherwise it wouldn't have the code you mentioned at all), the real issue is that the demo.html page has conflicting commands, the:

<html lang="en">

vs. the

var dojoConfig = {
        parseOnLoad: true,
        isDebug: true,

Rawld - I don't know where the tutorial repository is, but I know that we don't have write permission on it anyway.

comment:7 Changed 10 years ago by Colin Snover

Resolution: invalid
Status: assignedclosed

So it seems this is just an issue with the tutorial so closing invalid.

Note: See TracTickets for help on using tickets.