Jump to content

Language Problem


MGLP

Recommended Posts

1) I have French wording in my site.  French has accents.  The accented letters show up as a ? in a diamond shape, i.e., .

How can I get the correct accented letters to show?

2) If I want to have a choice of French and English, do I need to have 2 separate set of files or is there a translation facility and if so, can you provide me the guidance.

Thank you.

 

Link to comment
Share on other sites

re your point (1),  how do I save files using UTF-8?  My code is in Notepad files and I save them as PHP files.

re your point (2), ok, I've put in the <meta charset("UTF-8")> in my code right after the <head> tag but still have the problem (I suppose because of point (1) not done.

I understand your point 3 about the database and will do.

Link to comment
Share on other sites

MS Notepad: click 'Save As...' from File tab, the 'Save As' window will open, at the bottom you should see Encoding: and by default will show 'ANSI', click dropdown arrow and select 'UTF-8', then save.

Note: Using Notepad++, would do this automatically, and is much better than MS Notepad.

Link to comment
Share on other sites

In the euphoria of having gotten the solution to my first problem/question I forgot that I didn't get a reply to my 2nd problem/question which was:

2) If I want to have a choice of French and English, do I need to have 2 separate set of files or is there a translation facility and if so, can you provide me the guidance.

I should perhaps have also said    '... or 2 sets of code?'

Example:  my form says:   Name:____________  Address: _____________ etc., etc., etc.

                 but if the user has selected French, then I want:   Nom:_____________   Adresse:______________ etc., etc., etc.

 

 

Link to comment
Share on other sites

You can use google translate or similar, but! the downside is its not perfect. The other option is to use maybe a sub-domain such as fr.yoursitename.com, this will be manually edited to reflect a totally French language site, then by clicking a language link on both, you will taken to one or the other.

Link to comment
Share on other sites

if the content is from database that hold French content. It just needs an identifier to switch to French content and could use the same php file. Some CMS systems have language files for commonly used words, like 'Name' and 'Address' for example, these would have there French equivalent words, so when 'French' website is selected it would use 'Name' as a key to show 'Nom' and 'Address' key to show 'Adresse'.

Link to comment
Share on other sites

The database data is not a problem.  My problem was with things like forms where the form needs to serve two different languages.

So all in all it seems I need to make two sets of php files - one for each language or one set with logic to display an English form or a French form.

Many thanks for your help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...