1

我在Chrome App Store中爲我的應用發佈多種語言。具有多個子域名的國際化

我試圖釋放我的應用程序,以便根據語言將Chrome應用程序故事語言版本鏈接到我們的子域。

實施例:

//in manifest.json: 
    "name": "__MSG_appName__", 
    "description": "__MSG_appDesc__", 
    "default_locale": "en", 

//in _locales/en/messages.json: 
{ 
    "appName": { 
    "message": "My App", 
    "description": "The title of the application, displayed in the web store." 
    }, 
    "appDesc": { 
    "message": "This app does something awesome.", 
    "description":"The description of the application, displayed in the web store." 
    } 

    >>>> THIS LANGUAGE SHOULD USE URL - EN.MYDOMAIN.COM 

} 

//in _locales/de/messages.json: 
{ 
    "appName": { 
    "message": "My Application German" 
    }, 
    "appDesc": { 
    "message": "This application does something brilliant in German." 
    } 

    >>>> THIS LANGUAGE SHOULD USE URL - DE.MYDOMAIN.COM 

} 

都支持十分讚賞。我如何才能讓Chrome App Store根據語言重定向到正確的區域設置子域url?

回答

2

「應該使用URL」是什麼意思?您是託管應用程序還是打包的應用程序?如果您的意思是託管應用程序,請參閱https://code.google.com/p/chromium/issues/detail?id=85034以及由此產生的代碼更改,其示例如下:https://codereview.chromium.org/9421010/diff/6001/chrome/test/data/extensions/manifest_tests/launch_local_path_localized.json

{ 
    "name": "test", 
    "version": "1", 
    "default_locale": "en", 
    "app": { 
    "launch": { 
     "local_path": "__MSG_local_launch_path__" 
    } 
    } 
}