'From etoys3.0 of 24 February 2008 [latest update: #2143] on 14 September 2008 at 2:58:48 pm'! "Change Set: TextLocaleChng-yo Date: 14 September 2008 Author: Yoshiki Ohshima Fix the localeChange inTextMorph so that the multi language feature doesn't fail when there is no previous locale is known."! !TextMorph methodsFor: 'localization' stamp: 'yo 9/12/2008 15:18'! localeChanged "Remember contents for previous locale and change contents to new locale if existing. Sent from Project>>updateLocaleDependents" | locale oldContents | self translatable ifFalse: [^ self]. locale := self valueOfProperty: #locale ifAbsent: [#none]. oldContents := self translations at: locale ifAbsent: [nil]. oldContents = self contents ifFalse: [ Locale previous ifNotNil: [ self translations at: LocaleID previous put: self contents copy. self setProperty: #locale toValue: LocaleID previous]]. self setLocale: LocaleID current! !