MDFS::Software.RISCOS.ResFind Search  

Internationalising RISC OS Applications with ResFind

Application Directory Structure
===============================
The application directory should contain the following:

!MyApp
 +-!Boot
 +-!Help
 +-!Run
 |
 +-Resources
    +-ResFind
    |
    and language directories, eg:
    |
    +-France
    +-Germany
    +-UK            there should always be a 'UK' as a minimum
      |
      each language directory contains the same set of files, eg:
      |
      +-Messages
      +-Templates   if necessary
      +-etc.        any others as necessary


!Run file contents
==================
The file !MyApp.!Run should include:
  Run <Obey$Dir>.Resources.FindRes
or
  Run <Obey$Dir>.Resources.FindRes MyAppName

"FindRes" uses the application directory's name as the base name, for
example, "!MyApp" becomes "MyApp". "FindRes MyAppName" uses "MyAppName" as
the base name.


System Variables Available
==========================
The application will be able to use:
<MyApp$Dir>     to access it's directory
MyAppRes:       to access the current language-specific resources
MyApp:          some versions of FindRes set this to the application directory

Eg:
*IconSprites <MyApp$Dir>.!Sprites
SYS "MessageTrans_OpenFile",file%,"AppRes:Messages"
SYS "Wimp_OpenTemplate",,"AppRes:Templates"


Specifying Language Preferences
-------------------------------
When ResFind is run, it looks for translations (that is language
directories) along the following list of languages:

<MyApp$Language>
        where MyApp is the name of the application.

<ResFind$LanguagesPref>
        containing the list of languages prefered to the one the computer is
        configured

The configured language
        set with *Configure Territory <territory>

<ResFind$LanguagesSuff>
        containing the list of languages prefered to the default English
        (UK) language.

UK      as the final, default language when no other can be found.

The system variables MyApp$Language, ResFind$LanguagesPref and
ResFind$LanguagesSuff are set by the application ResConf, or can
be set manually.

See also
========
RISC OS Foundation (local copy).
German Acorn Group (local copy)
StrongHelp document

Downloads:
ResFind v2.00  - Sets App$Dir, AppRes$Path and uses App$Dir in AppRes$Path
ResFind v2.00j - Sets App$Dir, App$Path, AppRes$Path and uses App: in AppRes$Path
ResFind v2.01d - Sets App$Dir, AppRes$Path and uses App$Dir in AppRes$Path
ResFind v2.01jgh - Sets App$Dir, AppRes$Path and uses App$Dir in AppRes$Path,
                    AppRes$Path includes App.Resources directory

Related subjects

RISC OS Choices
Last updated: 12-Apr-2004 JGH