internationalization - GWT i18n and images -


is there way internationalize images (using g:image , imageresource) in gwt? can see, possible internationalize src attribute of img element, using:

<img src="http://www.images.com/englishversionofimage.png" alt=""> <ui:attribute name="src" description="image internationalized"/> </img> 

and changing src value in appropriate localizableresource_xxxx.properties file.

however, technique not seem applicable <g:image resource="{resources.myimageresource}"/> elements.

should simple other source types (https://developers.google.com/web-toolkit/doc/latest/devguideclientbundle#i18n). in simple words, if use text labels:

  • messages.properties
  • messages_fr.properties
  • messages_de.properties

, try same technique images:

  • logo.jpg
  • logo_fr.jpg
  • logo_de.jpg

the proper file should have been chosen depending on current locale.

so, considering example https://developers.google.com/web-toolkit/doc/latest/devguideuibinder#using_an_external_resource use:

<g:image resource='{res.logo}'/> 

and have class

/**   * resources used entire application. */ public interface resources extends clientbundle {    @source("logo.jpg")   imageresource logo(); ... 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -