zoukankan      html  css  js  c++  java
  • Maven下Flex国际化配置

           之前写了flashbulid、initellij下的flex国际化配置,它们都是在本地打包发布的,那么我们的工程用maven管理了,需要自动发布。这时候如何修改flex的pom文件,来让它build的时候支持国际化呢?

           同理,我们需要在Maven build flex的插件配置标签里配置国际化支持,看代码:

    <build>
            <finalName>FlexI18nTest</finalName>
            <sourceDirectory>src</sourceDirectory>
            <outputDirectory>./out</outputDirectory>
            <plugins>
                <plugin>
                    <groupId>org.sonatype.flexmojos</groupId>
                    <artifactId>flexmojos-maven-plugin</artifactId>
                    <version>${flexmojos.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <sourceFile>FlexI18nTest.mxml</sourceFile>
                        <outputDirectory>./out</outputDirectory>
                        <localesSourcePath>
                            ${basedir}/locale/{locale}
                        </localesSourcePath>
                          <localesCompiled>
                              <locale>en_US</locale>
                              <locale>zh_CN</locale>
                          </localesCompiled>
                        <policyFileUrls>
                            <!--- cross domain policy for each RSL entry -->
                            <url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
                            <url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
                            <url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
                        </policyFileUrls>
    
                        <rslUrls>
                            <url>
                                http://fpdownload.adobe.com/pub/{extension}/flex/${flex.sdk.version}/{artifactId}_{version}.{extension}
                            </url>
    
                            <url>
                                http://fpdownload.adobe.com/pub/{extension}/tlf/${flex.tlf.version}/{artifactId}_${flex.tlf.version}.{extension}
                            </url>
    
                            <url>
                                http://fpdownload.adobe.com/pub/{extension}/flex/${flex.sdk.version}/{artifactId}_${flex.osmf.version}.{extension}
                            </url>
                        </rslUrls>
                        <debug>true</debug>
                        <swfVersion>11</swfVersion>
                        <targetPlayer>10.2</targetPlayer>
                        <storepass/>
                        <optimize>true</optimize>
                        <showWarnings>true</showWarnings>
                        <allowSourcePathOverlap>true</allowSourcePathOverlap>
                    </configuration>
                </plugin>
            </plugins>
        </build>

     Flexmojos 版本号:4.0-RC2

    Maven版本号:4.0.0

    我添加了两种语言支持 ,中文和英文。

    <localesSourcePath> ${basedir}/locale/{locale} </localesSourcePath>

    <localesCompiled> <locale>en_US</locale> <locale>zh_CN</locale> </localesCompiled>

  • 相关阅读:
    Andorid中写文件后在电脑上看不到的解决办法
    【Android布局】在程序中设置android:gravity 和 android:layout_Gravity属性
    OpenCV入门学习笔记
    视频播放(iOS开发)
    音频播放(iOS开发)
    iPad开发(相对于iPhone开发时专有的API)
    静态库/内存分析/通讯录/换肤/硬件信息获取
    Alpha冲刺! Day1
    软工团队
    软工团队
  • 原文地址:https://www.cnblogs.com/yangpigao/p/3256723.html
Copyright © 2011-2022 走看看