英文:
Get and Set a field with PXDBLocalizableStringAttribute
问题
I would like set a translate field with PXDBLocalizableStringAttribute type.
For get, I use this syntax:
PXDBLocalizableStringAttribute.GetTranslation(Base.Caches[typeof(PMProject)], row, typeof(PMProject.description).Name, "FR");
In the Acumatica documentation, I don't find the set syntax with language:
I try this, but the value impacts all languages:
PXDBLocalizableStringAttribute.SetTranslationsFromMessageFormatNLA<typeof(PMProject.description).Name(cache, row, "FR" + Convert.ToString(row.QuoteNbr), "FR");
I would like to use a function to set a value for only one language.
Thanks.
英文:
I would like set a translate field with PXDBLocalizableStringAttribute type.
For get, I use this syntax:
PXDBLocalizableStringAttribute.GetTranslation(Base.Caches[typeof(PMProject)], row, typeof(PMProject.description).Name,"FR");
In the acumatica documentation, I don't find the set syntax with language :
I try this, but the value impact all language.
PXDBLocalizableStringAttribute.SetTranslationsFromMessageFormatNLA<typeof(PMProject.description).Name(cache,row,"FR"+Convert.ToString(row.QuoteNbr),"FR");
I would like use a function to set a value for only one langage.
Thanks.
答案1
得分: 0
以下是翻译好的部分:
"The translation dictionaries screen (SM200540) shows what translations from one language to another. You can set the translation, and then perform the get on the field as you posted, and see if it works. I have also used this method to replace messages that you cannot override.
For example, 'The vendor status is {0}.' has been changed to 'The vendor status is {0}. Please contact purchasing to continue.'
This allows the error messages in the multiple modules of Acumatica to all be updated."
英文:
The translation dictionaries screen (SM200540) shows what translations from one language to another. You can set the translation, and then perform the get on the field as you posted, and see if it works. I have also used this method to replace messages that you cannot override.
For example, "The vendor status is '{0}'." has been changed to "The vendor status is '{0}'. Please contact purchasing to continue."
This allows the error messages in the multiple modules of Acumatica to all be updated.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论