'From etoys3.0 of 24 February 2008 [latest update: #1986] on 19 June 2008 at 1:24:03 pm'! LanguageEnvironment subclass: #NepaleseEnvironment instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Multilingual-Languages'! KeyboardInputInterpreter subclass: #UTF32NPInputInterpreter instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Multilingual-TextConversion'! !EncodedCharSet class methodsFor: 'class methods' stamp: 'yo 6/12/2008 14:38'! initialize " self initialize " self allSubclassesDo: [:each | each initialize]. EncodedCharSets _ Array new: 256. EncodedCharSets at: 0+1 put: Latin1Environment. EncodedCharSets at: 1+1 put: JISX0208. EncodedCharSets at: 2+1 put: GB2312. EncodedCharSets at: 3+1 put: KSX1001. EncodedCharSets at: 4+1 put: JISX0208. EncodedCharSets at: 5+1 put: JapaneseEnvironment. EncodedCharSets at: 6+1 put: SimplifiedChineseEnvironment. EncodedCharSets at: 7+1 put: KoreanEnvironment. EncodedCharSets at: 8+1 put: GB2312. "EncodedCharSets at: 9+1 put: UnicodeTraditionalChinese." "EncodedCharSets at: 10+1 put: UnicodeVietnamese." EncodedCharSets at: 12+1 put: KSX1001. EncodedCharSets at: 13+1 put: GreekEnvironment. EncodedCharSets at: 14+1 put: Latin2Environment. EncodedCharSets at: 15+1 put: RussianEnvironment. EncodedCharSets at: 15+1 put: NepaleseEnvironment. EncodedCharSets at: 256 put: Unicode. ! ! !LanguageEnvironment class methodsFor: 'class initialization' stamp: 'mir 7/15/2004 16:13'! localeChanged self startUp! ! !LanguageEnvironment class methodsFor: 'class initialization' stamp: 'yo 6/12/2008 15:08'! localeChangedGently self clearDefault. ActiveHand clearKeyboardInterpreter. self setUsePangoFlag. ! ! !LanguageEnvironment class methodsFor: 'class initialization' stamp: 'yo 6/12/2008 14:51'! startUp self clearDefault. Clipboard startUp. self setUsePangoFlag. ! ! !LanguageEnvironment class methodsFor: 'private' stamp: 'yo 6/12/2008 18:03'! setUsePangoFlag | new old | old := Preferences usePangoRenderer. new := RomePluginCanvas pangoIsAvailable and: [Locale current languageEnvironment class usePangoRenderer]. new ~~ old ifTrue: [ Preferences setPreference: #usePangoRenderer toValue: new. TextMorph usePango: new. ].! ! !LanguageEnvironment class methodsFor: 'private' stamp: 'yo 6/12/2008 14:53'! usePangoRenderer ^ false. ! ! !NepaleseEnvironment methodsFor: 'as yet unclassified' stamp: 'yo 6/12/2008 18:04'! isFontAvailable ^ RomePluginCanvas pangoIsAvailable. ! ! !NepaleseEnvironment class methodsFor: 'subclass responsibilities' stamp: 'yo 6/12/2008 17:55'! clipboardInterpreterClass ^ UTF8ClipboardInterpreter. ! ! !NepaleseEnvironment class methodsFor: 'subclass responsibilities' stamp: 'yo 6/12/2008 17:56'! fileNameConverterClass ^ UTF8TextConverter. ! ! !NepaleseEnvironment class methodsFor: 'subclass responsibilities' stamp: 'yo 6/12/2008 17:29'! inputInterpreterClass | platformName osVersion | platformName := SmalltalkImage current platformName. osVersion := SmalltalkImage current getSystemAttribute: 1002. (platformName = 'Win32' and: [osVersion = 'CE']) ifTrue: [^ MacRomanInputInterpreter]. platformName = 'Win32' ifTrue: [^ UTF32NPInputInterpreter]. platformName = 'Mac OS' ifTrue: [^ MacUnicodeInputInterpreter]. platformName = 'unix' ifTrue: [^ UTF32NPInputInterpreter]. ^ MacRomanInputInterpreter! ! !NepaleseEnvironment class methodsFor: 'subclass responsibilities' stamp: 'yo 6/12/2008 17:24'! leadingChar ^ 15. ! ! !NepaleseEnvironment class methodsFor: 'subclass responsibilities' stamp: 'yo 6/19/2008 13:22'! supportedLanguages "Return the languages that this class supports. Any translations for those languages will use this class as their environment." ^#('ne')! ! !NepaleseEnvironment class methodsFor: 'subclass responsibilities' stamp: 'yo 6/12/2008 17:56'! systemConverterClass ^ UTF8TextConverter. ! ! !NepaleseEnvironment class methodsFor: 'private' stamp: 'yo 6/12/2008 14:59'! usePangoRenderer ^ true ! ! !UTF32NPInputInterpreter methodsFor: 'all' stamp: 'yo 6/12/2008 17:28'! nextCharFrom: sensor firstEvt: evtBuf | keyValue | keyValue := evtBuf at: 6. keyValue < 256 ifTrue: [^ (Character value: keyValue) squeakToIso]. ^ Character leadingChar: NepaleseEnvironment leadingChar code: keyValue! ! EncodedCharSet initialize! "Postscript: " LanguageEnvironment resetKnownEnvironments!