Batch task to make all terms lower case?

I have a Termbase with terms capitalized in different ways. Some are lower case (example: "bulk"), some are capitalized only the first word (example: "Block diagram") and some are capitalized each word (example: "Power Line Communication"). I'd like to standardize the Termbase, making all terms lower case (so, for the examples given, they would become: "bulk", "block diagram" and "power line communication"). Is this possible?

emoji
Parents
  • I would export the termbase to Excel (using the Glossary Converter), convert all to lowercase, and then reconvert to sdltb (termbase format).

    emoji
  •  

    And just to add another idea... now you know how to use MS Access for your termbase you could save a copy of the termbase as an .accdb file and add this macro (Alt+F11):

    Sub ConvertOrigTermToLower()
        Dim db As DAO.Database
        Dim rs As DAO.Recordset
        Dim sqlQuery As String
    
        Set db = CurrentDb()
    
        ' Process I_Portuguese table
        sqlQuery = "SELECT termid, origterm FROM I_Portuguese;"
        Set rs = db.OpenRecordset(sqlQuery, dbOpenDynaset)
        
        Do While Not rs.EOF
            rs.Edit
            rs!origterm = LCase(rs!origterm)
            rs.Update
            rs.MoveNext
        Loop
        rs.Close
    
        ' Process I_English table
        sqlQuery = "SELECT termid, origterm FROM I_English;"
        Set rs = db.OpenRecordset(sqlQuery, dbOpenDynaset)
    
        Do While Not rs.EOF
            rs.Edit
            rs!origterm = LCase(rs!origterm)
            rs.Update
            rs.MoveNext
        Loop
        rs.Close
    
        Set rs = Nothing
        Set db = Nothing
    
        MsgBox "All terms converted to lowercase successfully!", vbInformation
    End Sub
    

    Check the tables I used as this is for the last example we looked at.  But it seems to work and it's quick.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
Reply
  •  

    And just to add another idea... now you know how to use MS Access for your termbase you could save a copy of the termbase as an .accdb file and add this macro (Alt+F11):

    Sub ConvertOrigTermToLower()
        Dim db As DAO.Database
        Dim rs As DAO.Recordset
        Dim sqlQuery As String
    
        Set db = CurrentDb()
    
        ' Process I_Portuguese table
        sqlQuery = "SELECT termid, origterm FROM I_Portuguese;"
        Set rs = db.OpenRecordset(sqlQuery, dbOpenDynaset)
        
        Do While Not rs.EOF
            rs.Edit
            rs!origterm = LCase(rs!origterm)
            rs.Update
            rs.MoveNext
        Loop
        rs.Close
    
        ' Process I_English table
        sqlQuery = "SELECT termid, origterm FROM I_English;"
        Set rs = db.OpenRecordset(sqlQuery, dbOpenDynaset)
    
        Do While Not rs.EOF
            rs.Edit
            rs!origterm = LCase(rs!origterm)
            rs.Update
            rs.MoveNext
        Loop
        rs.Close
    
        Set rs = Nothing
        Set db = Nothing
    
        MsgBox "All terms converted to lowercase successfully!", vbInformation
    End Sub
    

    Check the tables I used as this is for the last example we looked at.  But it seems to work and it's quick.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
Children
No Data