문제

나는 Obensocial Application에 다국어 지원을 추가하려고 노력하고 있습니다. 가제트 XML 마크 업에서 내 자신의 메시지 번들에 연결할 수 있습니다.

<Module>
  <ModulePrefs title="Hello" description="Message bundle demo">
     <Require feature="opensocial-0.7"/>
     <Locale lang="en" messages="http://example.com/hello/en_ALL.xml"/>
  </ModulePrefs>
  . . .
</Module>

그러나 실제로 그들로부터 값을 어떻게 추출합니까?

도움이 되었습니까?

해결책

값을 추출하려면 사용해야합니다 getmsg 방법

var prefs = new gadgets.Prefs();
var msg = prefs.getMsg('hello_world');
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top