Cursos de Navision 100% online › Foros › Foro Dynamics NAV y Business Central › Enum con multiidioma
Etiquetado: enum multiidioma
Este debate contiene 2 respuestas, tiene 2 mensajes y lo actualizó Imak hace 8 meses, 1 semana.
-
AutorPublicaciones
-
29 marzo, 2019 a las 10:10 am #9558
Hola,
he intenado implementar siguiendo el video el ejemplo de campo de tipo enum, pero además intentando que incluyera la posibilidad de multilenguaje.
Para ello he hecho lo siguiente:
-Definir la propiedad Caption para los valores del enum «Customer Type»:
p.e.: Caption = ‘Company’, comment = ‘ESP=»Compañía»‘;
-Definir la propiedad caption para el campo «Customer Type» en las tablas extendidas de cliente y sales header:
Caption = ‘Customer Type’, comment = ‘ESP=»Tipo cliente»‘;
He borrado el fichero HolaMundoBase.xlf y he generado de nuevo el paquete (Ctrl+May.+b) para volver a generar de nuevo el fichero .xlf, con el siguiente resultado:
<?xml version=»1.0″ encoding=»utf-8″?>
<xliff version=»1.2″ xmlns=»urn:oasis:names:tc:xliff:document:1.2″ xmlns:xsi=»http://www.w3.org/2001/XMLSchema-instance» xsi:schemaLocation=»urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd»>
<file datatype=»xml» source-language=»en-US» target-language=»en-US» original=»HolaMundoBase»>
<body>
<group id=»body»>
<trans-unit id=»TableExtension 383620348 – Field 1198862960 – Property 2879900210″ size-unit=»char» translate=»yes» xml:space=»preserve»>
<source>Customer Type</source>
<note from=»Developer» annotates=»general» priority=»2″>ESP=»Tipo cliente»</note>
<note from=»Xliff Generator» annotates=»general» priority=»3″>TableExtension MyCustomer – Field Customer type – Property Caption</note>
</trans-unit>
<trans-unit id=»TableExtension 2296039725 – Field 1198862960 – Property 2879900210″ size-unit=»char» translate=»yes» xml:space=»preserve»>
<source>Customer Type</source>
<note from=»Developer» annotates=»general» priority=»2″>ESP=»Tipo cliente»</note>
<note from=»Xliff Generator» annotates=»general» priority=»3″>TableExtension MySalesHeader – Field Customer type – Property Caption</note>
</trans-unit>
<trans-unit id=»Enum 1754546768 – EnumValue 1371923692 – Property 2879900210″ size-unit=»char» translate=»yes» xml:space=»preserve»>
<source> </source>
<note from=»Developer» annotates=»general» priority=»2″></note>
<note from=»Xliff Generator» annotates=»general» priority=»3″>Enum Customer Type – EnumValue – Property Caption</note>
</trans-unit>
<trans-unit id=»Enum 1754546768 – EnumValue 3133801257 – Property 2879900210″ size-unit=»char» translate=»yes» xml:space=»preserve»>
<source>Company</source>
<note from=»Developer» annotates=»general» priority=»2″>ESP=»Compañía»</note>
<note from=»Xliff Generator» annotates=»general» priority=»3″>Enum Customer Type – EnumValue Company – Property Caption</note>
</trans-unit>
<trans-unit id=»Enum 1754546768 – EnumValue 871098955 – Property 2879900210″ size-unit=»char» translate=»yes» xml:space=»preserve»>
<source>Freelance</source>
<note from=»Developer» annotates=»general» priority=»2″>ESP=»Independiente»</note>
<note from=»Xliff Generator» annotates=»general» priority=»3″>Enum Customer Type – EnumValue Freelance – Property Caption</note>
</trans-unit>
</group>
</body>
</file>
</xliff>He ejecutado el comando AL Generate Xliff files (AL Tools) y se ha generado el fichero HolaMundoBase.es-ES.g.xlf con el siguiente contenido:
<?xml version=»1.0″ encoding=»UTF-8″ standalone=»yes»?>
<xliff version=»1.2″ xmlns=»urn:oasis:names:tc:xliff:document:1.2″ xmlns:xsi=»http://www.w3.org/2001/XMLSchema-instance» xsi:schemaLocation=»urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd»>
<file datatype=»xml» source-language=»en-US» target-language=»es-ES» original=»HolaMundoBase»>
<body>
<group id=»body»>
<trans-unit id=»TableExtension 383620348 – Field 1198862960 – Property 2879900210″ size-unit=»char» translate=»yes» xml:space=»preserve»>
<source>Customer Type</source>
<note from=»Developer» annotates=»general» priority=»2″>ESP=»Tipo cliente»</note>
<note from=»Xliff Generator» annotates=»general» priority=»3″>TableExtension MyCustomer – Field Customer type – Property Caption</note>
<target>Tipo cliente</target>
</trans-unit>
<trans-unit id=»TableExtension 2296039725 – Field 1198862960 – Property 2879900210″ size-unit=»char» translate=»yes» xml:space=»preserve»>
<source>Customer Type</source>
<note from=»Developer» annotates=»general» priority=»2″>ESP=»Tipo cliente»</note>
<note from=»Xliff Generator» annotates=»general» priority=»3″>TableExtension MySalesHeader – Field Customer type – Property Caption</note>
<target>Tipo cliente</target>
</trans-unit>
<trans-unit id=»Enum 1754546768 – EnumValue 1371923692 – Property 2879900210″ size-unit=»char» translate=»yes» xml:space=»preserve»>
<source> </source>
<note from=»Developer» annotates=»general» priority=»2″/>
<note from=»Xliff Generator» annotates=»general» priority=»3″>Enum Customer Type – EnumValue – Property Caption</note>
</trans-unit>
<trans-unit id=»Enum 1754546768 – EnumValue 3133801257 – Property 2879900210″ size-unit=»char» translate=»yes» xml:space=»preserve»>
<source>Company</source>
<note from=»Developer» annotates=»general» priority=»2″>ESP=»Compañía»</note>
<note from=»Xliff Generator» annotates=»general» priority=»3″>Enum Customer Type – EnumValue Company – Property Caption</note>
<target>Compañía</target>
</trans-unit>
<trans-unit id=»Enum 1754546768 – EnumValue 871098955 – Property 2879900210″ size-unit=»char» translate=»yes» xml:space=»preserve»>
<source>Freelance</source>
<note from=»Developer» annotates=»general» priority=»2″>ESP=»Independiente»</note>
<note from=»Xliff Generator» annotates=»general» priority=»3″>Enum Customer Type – EnumValue Freelance – Property Caption</note>
<target>Independiente</target>
</trans-unit>
</group>
</body>
</file>
</xliff>He comprobado el contenido de ambos ficheros .xlf y no veo problema alguno.
El caso es que cuando ejecuto el cliente web y voy a la ficha del cliente, el nuevo campo «Customer Type» y sus valores posibles siempre se muestran en ingles, independientemente de que cambie el idioma a emplear desde la configuración del cliente.
Mis preguntas son: ¿es posible utilizar multiidioma para los enum?, y de ser así, ¿cuál es manera de hacerlo?
Gracias y un saludo
29 marzo, 2019 a las 1:06 pm #9559Hola,
En principio la teoria es que si, que se puede utilizar multiidioma en los enums. Y por los pasos que cuentas que has dado, yo lo veo todo correcto. En principio el procedimiento que has seguido es el correcto.
Otra cosa es que quizá, siendo como son tan nuevos los enum, tengan algún tipo de bug con el tema del idioma.
Haré una prueba para ver si me funciona o no el tema del idioma en los enums y te cuento.
¿Qué versión de Business Central utilizas y en qué tipo de instalación? Cloud, sandbox del cloud, on-premise, cumulative, docker?Un saludo,
Cristina Nicolàs¿Quieres conocer las últimas novedades sobre Business Central? Dynamics ScaleUp 2019.
Consulta fechas en
DynamicsScaleUp.com29 marzo, 2019 a las 1:55 pm #9563Hola Cristina,
Estoy trabajando con un contenedor docker en la que tengo instalada una imagen de business central cu3.
Saludos
-
AutorPublicaciones
Debes estar registrado para responder a este debate.