Skip to content

RundizBones/ModuleLanguages

Repository files navigation

Languages module for RundizBones framework.

This module is for switch to selected URL by cookie or URL segment (depend on configuration on your framework installation).

If the new language ID is not available in framework's configuration, the default will be use instead.

Tested up to PHP 8.5.

Installation

Download and extract files into /Modules/Languages folder.

REST API URL.

Method URL Params Description
GET /languages None Get all languages to render in HTML such as select box.
PUT /languages/update currentUrl (string) Your current URL. Must not contains any language ID.
rundizbones-languages (string) The new language ID same as in configuration that you want to change to.
currentLanguageID (string) Current language ID before changing.
Change to selected language

Please note that the URL should begins with your installation path. Example your installation is in /myapp then the URL must changed to /myapp/languages.

Example work flow:
PUT /languages/update with params: currentUrl='/contact' rundizbones-languages='en-US' currentLanguageID='th'
Result will be returned: redirectUrl /en-US/contact

About

Languages module for RundizBones framework.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages