         [ char-quot call out push ] ?if
     ] each out "" like ; inline
 
+: locale>lower ( string -- string' )
+    locale get
+    [ i-dot? [ turk>lower ] when ]
+    [ lithuanian? [ lithuanian>lower ] when ] bi ;
+
+: locale>upper ( string -- string' )
+    locale get
+    [ i-dot? [ turk>upper ] when ]
+    [ lithuanian? [ lithuanian>upper ] when ] bi ;
+
 PRIVATE>
 
 : >lower ( string -- lower )
-    i-dot? [ turk>lower ] when
-    lithuanian? [ lithuanian>lower ] when
-    final-sigma
+    locale>lower final-sigma
     [ lower>> ] [ ch>lower ] map-case ;
 
 HINTS: >lower string ;
 
 : >upper ( string -- upper )
-    i-dot? [ turk>upper ] when
-    lithuanian? [ lithuanian>upper ] when
+    locale>upper
     [ upper>> ] [ ch>upper ] map-case ;
 
 HINTS: >upper string ;

<PRIVATE

: (>title) ( string -- title )
    i-dot? [ turk>upper ] when
    lithuanian? [ lithuanian>upper ] when
    [ title>> ] [ ch>title ] map-case ; inline

PRIVATE>

: replace ( old new str -- newstr )
    [ split-subseq ] dip join ; inline

: i-dot? ( locale -- ? )
    { "tr" "az" } member? ; inline

: lithuanian? ( locale -- ? ) "lt" = ; inline

: lithuanian>upper ( string -- lower )
    "i\u000307" "i" replace
