This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Get Translated Caption for a Single Object in a Table in a customer script

Im working with 7.1.3.

In a Custom Script in need the translations for a single object in a table.

For example von the table ADSGroup it would be en: "Active Directory group", fr: "Groupe Active Directory", ... (but not the plural like en: "Active Directory groups"

Is there a simple solution (for example a predefined script) to do that for any table?

Parents
  • The following small function demonstrates how to fetch the caption for a column. You can use it to fetch the caption for the PK column of your object as the caption should be in the singular.

    So in your case, use UID_ADSGroup as column name when calling the function.

    Public Function SDG_GetColumnCaption(ByRef entity As IEntity, columnName As String) As String
        Return entity.GetDisplayName(Session, columnName).Translated
    End Function


  • Hi Markus

    That work, but I'm facing the same problem as mentioned in www.quest.com/.../61394

    While I'm using that code:

    Dim translationType As String = String.Empty
    Dim ci As System.Globalization.CultureInfo= CultureInfo.CreateSpecificCulture(uid_dialogCulture.Substring(uid_dialogCulture.Length - 5))
    translationType = e.GetDisplayName(Session, "UID_" & e.Tablename).GetTranslated(ci)

    with the swiss language cultures de-CH, fr-CH and it-CH it works only for de-CH, since there is also a de-DE translation in the corresponding dialogmultilanguage.

    Do you know, if we can get the VPR#28852 also for 7.1.3?

     

    I wan't to avoid to change all the .config files for that purpose

Reply
  • Hi Markus

    That work, but I'm facing the same problem as mentioned in www.quest.com/.../61394

    While I'm using that code:

    Dim translationType As String = String.Empty
    Dim ci As System.Globalization.CultureInfo= CultureInfo.CreateSpecificCulture(uid_dialogCulture.Substring(uid_dialogCulture.Length - 5))
    translationType = e.GetDisplayName(Session, "UID_" & e.Tablename).GetTranslated(ci)

    with the swiss language cultures de-CH, fr-CH and it-CH it works only for de-CH, since there is also a de-DE translation in the corresponding dialogmultilanguage.

    Do you know, if we can get the VPR#28852 also for 7.1.3?

     

    I wan't to avoid to change all the .config files for that purpose

Children